The PHP Developer's Cookbook is a task-based reference designed to give developers easy-to-follow solutions to common problems that they might encounter when using PHP in Web site development. Each solution provides complete code listings along with an in-depth explanation of how and why a particular solution was used. PHP is an open source, server-side, HTML-embedded scripting language used to create dynamically generated Web pages. With an easy-to-use syntax and a large, extensible library of modules, PHP makes it fast and easy to create powerful data-driven Web sites for e-commerce, community portals, and other Web-based applications. The PHP Developer's Cookbook provides the experienced developer with complete solutions to specific needs they are likely to have while using PHP.
Bringing together hundreds of problems and solutions,
PHP Developer's Cookbook is an excellent resource for any PHP developer. Both the authors are members of the PHP development team, and with a foreword from Rasmus Lerdorf, the creator of PHP, there is no doubting the book's authority. The introduction notes that some sections cover previously undocumented material, making it particularly valuable for advanced PHP programmers. It is based on PHP 4.
Each chapter follows the same basic format. A short problem, such as "you want to find the time that has elapsed between two dates", is followed by a solution, usually with example code. Next comes a discussion section, typically full of interesting comments and insights. There are generally 10 to 15 problems in a chapter, and there are 23 chapters, so a lot of material is covered.
The first and longest part of the book covers language techniques, from basic tips and hints through to illuminating chapters on session handling and Web automation. The second short part tackles databases, and then the third part mainly covers communications, including e-mail, directory queries and socket programming. There is also an interesting snippet about working with COM or Java objects. Part four is about generating images and parsing XML, while the final part shows how to extend PHP with the Zend API. Appendixes cover troubleshooting, online resources and PHP 4 migration issues. Overall, a recommended title for anyone who wants to get the best from this superb open-source server-side scripting language. --Tim Anderson