If you find some of the process control documentation in the PHP manual hard to comprehend, it is because large parts are "borrowed" almost word-for-word from the classic book, "Advanced Programming in the Unix Environment", by W. Richard Stevens. This is an excellent book to keep to hand when using PHP, as PHP and Unix have such close ties. This is never more true than when working with process control, and you will find the sections on signals and processes from Stevens' book to be a treasure.
The topic of templates actually gets surprisingly good coverage in the book HTML & Web Design Tips & Techniques by Kris Jamsa et al, and there is even some solid content on PHP to boot.
Copyright ©2015 Paul Hudson. Follow me: @twostraws.