By Ryan Frishberg

Review – PHP 4 Bible

By Ryan Frishberg

Initially, I was very interested in the PHP 4 Bible. I’d heard that the book, which was co-authored by Tim Converse and Joyce Park, covered this particular topic nicely, unlike most other PHP books, which are typically written with PHP 3 in mind.

However, after reading the IDG Books Worldwide publication, I was sorely disappointed. As an experienced programmer with a previous introduction to PHP, I understood the initial chapters of the book. However, I’m afraid that without this previous knowledge, I would have been lost.

The Initial Chapters

The first thing you’ll find in the PHP 4 Bible is a basic explanation of PHP. As an ‘aid’ to this description, the text goes through an overly complicated example that deals with databases, complex HTML code, and CSS, apparently thrown in to perplex the reader (and I can assure you that, for newbies, it does a good job). As the authors try to explain basic PHP, they quickly rush through variables, and before they’ve even explained control structures and loops, they’re already trying to introduce the reader to OOP. The first 7 chapters are extremely poorly written, and any reader without a basic programming knowledge and some understanding of PHP will no doubt be lost already.

I thought, at this point, that the PHP 4 Bible could only get better. Thankfully, the book’s String and Array chapters were written fairly well, though I still had some gripes. For instance, the coverage of the printf() and sprintf() functions lacks the breadth of high quality examples that are neccessary for readers to really grasp the usefulness and syntax of these two functions. Moreover, I was surprised to find that at the end of the String chapter, the authors had tried to cram in regular expressions. This is an advanced topic; why cover it so soon? Perhaps they were afraid of including another chapter and more pages to the book? The explanation of the => operator was also very confusing. The reader might expect a good reference at the end of the String and Array chapters, or at the end of the book, but again, they’ll be disappointed.

One of the key reasons I was interested in the PHP 4 Bible was that, from the Table of Contents, it appears that the book contains a considerable amount of information on databases – one of the main strengths of PHP. However, a reader with no database experience could easily become lost (if he/she isn’t already) in the exploration of databses. Regardless of the fact that this is a PHP book, it should contain basic database information and techniques. It does not.

An Incomplete Reference

My two favorite chapters in this book were those that dealt with Cookies and Sessions, and which, surprisingly, were useful. Unfortunately, they didn’t achieve such success with the topic of Object-Oriented Programming. PHP was originally intended to be an easy language, so naturally, OOP support was not considered to be overly important. But the way it’s covered in this book makes OOP seem irrelevant. Though there’s an entire chapter dedicated to OOP, it contains virtually no useful information on the subject. In lieu of guidance, the authors give examples, which they leave the audience to decipher for themselves.

As a reader of many computer texts, I find that the scattering of extended examples throughout a book usually helps to make it more effective, and drive home the key learnings. The PHP 4 Bible would have been much more valuable as a reference or educational tool if it had included an extended example that combined all the PHP technologies that the book attempts to explore.

The Verdict

In conclusion, I wouldn’t recommend this book, simply because I can’t imagine whose needs it would meet. It’s not a book for beginners, as it demands a previous programming knowledge and basic PHP experience. But it also fails to qualify as an in-depth, advanced PHP 4 book, because, while it does try to address many topics, it covers nearly all of them poorly.

Nor does the PHP 4 Bible constitute a reference book, covering, as it does, only about 5% of the full compliment of PHP functions, and lacking a thorough reference. Although the PHP Documentation is a good, free reference, you might expect that, if you pay for a text, you’d gain a more thorough reference with better explanations and examples. If this is your expectation, don’t bother with the PHP 4 Bible.

2/5 Stars
Check it out here.

The most important and interesting stories in tech. Straight to your inbox, daily. Get Versioning.
Login or Create Account to Comment
Login Create Account