REVIEW - PHP Cookbook


Title:

PHP Cookbook

Author:

David Sklar, Adam Trachtenberg

ISBN:

Publisher:

O'Reilly (2003)

Pages:

608pp

Reviewer:

Christopher Hill

Reviewed:

April 2003

Rating:

★★☆☆☆


The book is aimed at PHP programmers who have a basic understanding of the language, although some of the chapters cover material that I would have considered basic (i.e. chapters on Strings, Numbers and Arrays). Each 'recipe' or code snippet is presented as the solution to a problem, which is followed by a discussion which highlights the relevant points and concludes with a 'See Also' which often refers to the PHP online manual.

Sometimes the Problem - Solution - Discussion format does not help the subject matter, e.g. Problem 'I want to use a trigonometric function' - Solution use sin(), cos(), tan(). At other times the solution does not at first appear to match the problem, e.g. Problem - 'You want to replace the 3rd record in a file of 80 byte records, so you have to write starting at 161st byte'. Solution - fseek($fh, 26);.

Most of the code is presented as one or two liners, with lots of description. There are some code examples that run over a number of pages. These tend to demonstrate the features already described, thus providing useful reinforcement and a practical programme. Thankfully there are very few screen shots and other fillers.

This is not a book that you would read cover to cover and indeed the authors advise against this. There are twenty chapters, with topics as diverse as XML, form handling, Objects, Regular Expressions, encryption and PEAR. The large code examples are well structured and practical.

Many similar examples appear in many other PHP books - so if this were only your 2nd or 3rd PHP book, it would be recommended, otherwise view a copy and ask yourself if it answers questions you have.


Book cover image courtesy of Open Library.





Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.