Book Reviews

PHP Cookbook: 1 by David Sklar and Adam Trachtenberg

No ImageBuy Now

List Price: £31.32


Paperback: 640 Pages.

Published: 30 November 2002 by O'Reilly Media

Edition: 1

ISBN: 1565926811

EAN: 9781565926813

This is a collection of problems, solutions, and practical examples for PHP programmers. The book contains a collection of best practices for everyday PHP programming dilemmas. For every problem addressed in the book, there's a worked-out solution or "recipe" - short, focused pieces of code that you can insert directly into your applications. Also included are explanations of how and why the code works, so you can learn to adapt the problem-solving techniques to similar situations.


4.0 Stars4.0 Stars4.0 Stars4.0 Stars  by Stephen Found

Packed with PHP Goodness

This is certainly not a book that is going to teach you to program using the PHP programming language and nor does it profess to be. However, if you have a problem then this may be the book to solve it. It offers recipes that can literally be copied from the book into your code. So you find the solution to your problem in the contents, turn to the page, copy the recipe that best fits your environment and there you have it.

As an example of what I mean by 'best fits your environment' if you want to parse XML data you can do it through DOM or SAX and the method you choose depends on what your server has available. This book describes both methods and also discusses how each solution works so you can adapt it for uses that do not quite fit what the book describes.

All the programming language recipe books are invaluable in my opinion and this one is no exception. It offers Recipes for :

String manipulation, Number parsing and manipulation, Processing dates and times, Handling arrays, Creating variables, functions and objects, Programming for the Web, Web Form processing, Database access, Web automation, XML creation and processing, Regular Expressions, Encryption and Security, Creating graphics, Internet Services, File handling, Directory Handling, Client side PHP and PEAR. Each subject contains between 8 and 20 recipes for common problems.

What this book does not do ( with the exception of describing how to create and use classes and objects ) is provide solutions with Object Oriented programming in mind. This is not really a problem in that if you are capable of programming PHP to support object oriented design then you are undoubtedly capable of utilising the recipes within your own classes. However, if you are expecting solutions to look like similar books for Java and C++, then this edition is not going to deliver.

PHP Cookbook is a book I dip into over and over again and is worth it's weight in gold. The only reason it has not got a 5 is that PHP is still evolving and I therefore expect to see new editions of this book in the future .

<< previous | next >>