Professional PHP4: A Book Review
Title: Professional PHP4Publisher: Wrox PressISBN: 1-861006-91-8Price: $49.99Buy this book
First off, let me tell you that I have always found Wrox Press books to look a little strange. That is, they all have red covers with pictures of one or more people on them. The cover of Professional PHP4 has 11 people.
Well, now I get it. Wrox is British--the British are different. So, I quickly got past the cover and found a great book inside.
Getting the negative out of the way quickly, the only two shortcomings I found were the lack of inclusion of Python (my personal preference) in the list of other scripting languages and no specific install information for Linux. But UNIX, which is pretty much identical, plus MacOS and Windoze were covered. Also, only Apache 1.x was covered, but I have yet to see a book covering 2.0.
The book starts off as expected, covering installation and the fundamentals of PHP--nothing really special here, but it is well done. Next is a chapter on Object Oriented Programming. Unlike most books I have seen on a specific programming language, this book took the subject seriously with over 40 pages of coverage, including object modeling in UML. I see this as a real plus, because this section is written well enough that people may actually understand why OOP makes sense.
Similarly, debugging is covered in a serious way. Again, the background is presented so you understand more than whether a program worked or not. It also provides good information on what debugging tools are available.
At first, the next chapter seemed to have a strange topic: "User Input and Regular Expressions". But the material quickly shows you why they fit together, specifically, using REs to validate user input. Duh. Again, the presentation helps the material make sense: first, readers are shown some validation techniques, and then they are given the details of REs.
We then move to the more generic subjects, such as sessions, cookies and files. This is followed by chapters on FTP, e-mail and news groups, networking and LDAP, multitier development and WAP--sorta the step toward applications.
The following three chapters cover databases. Rather than pick a specific one, MySQL, PostgreSQL and ODBC are all covered. This is not done in great detail, each chapter being from 20 to 40 pages. But the goal is not to teach you MySQL, for example, but to show you how it works with PHP. I feel this goal is attained.
The last chapters of the book cover non-Web use of PHP, XML, internationalization, optimization and external libraries, as well as how to build a user permission system. All of these are useful subjects, and each appears to be covered well.
All in all, I found the book to be very well done--both in the subject choices and the actual coverage. The authors points you to other resources when they make sense, instead of letting you think this book has all the answers. If you have some basic programming knowledge (not necessarily in PHP) and want to learn how to do PHP the right way, I highly recommend this book.
Phil Hughes is the publisher of Linux Journal.