Updates
Latest Tweet
What's New?
Check out for latest innovation, a computer based training video collection
Like this Page
Upgrading to PHP 5 Review by Conrad Shultz
Another Excellent Offering From O'Reilly
I own a sizable collection of O'Reilly books and have found them to in general be very well written and useful. "Upgrading to PHP 5" continues this tradition superbly.
This book is _not_ for new PHP coders; the vast majority of the text assumes good familiarity with PHP 4.x. If you have this familiarity then you will find this book to be a thorough and well-organized primer on the many new features in the new PHP.
The first chapter merely lists the major areas that have changed in the latest PHP, each of which roughly corresponds to a chapter in the book.
Major enhancement to the OOP facilities of PHP are appropriately discussed in the next chapter. Unfortunately, this is probably the most clumsily written chapter due a strange desire to educate the reader in OOP basics (about the only place in the book where this mistake is committed). The result is a schism that imposes redundancy in the material while simultaneously making it unduly hard to locate specific topics.
Thankfully the subsequent two chapters (on the new MySQL interface and the SQLite database) are uniformly well-written. Especially useful is a (perhaps oddly-situated) section on migration strategies from a PHP 4/MySQL 4.0 platform to a PHP 5/MySQL 4.1 platform.
A chapter on XML follows, but I did not read it in great detail since my applications tend to not require it, so other reviewers are likely to provide greater insights here.
Iterators, yet another feature completely new to PHP 5, are covered next. Unlike much of the conventional PHP fare (even OOP) this topic really does require understanding of rather abstract concepts (especially when debugging the RecusrsiveIterator interface). For this reason, while clearly written it may take hobbiests some time to take this material to heart.
The new error-handling functions are introduced next. I think that the chapter could have benefited from a little more discussion; Trachtenberg seems to think providing code samples is almost self-explanatory. At the end of the day, though, the chapter does its job.
The chapter on streams and filters is another one that I barely perused, so I defer to other reviewers on this topic.
The penultimate chapter provides a very cursory evaluation of a handful of extensions to PHP. While certainly useful to the practicing PHP programmer they are covered in so brief a manner that you will need a separate text to implement them meaningfully. But this chapter does give enough information to at least evaluate the extensions' potential usefulness in an application.
Trachtenberg concludes with an example PHP application. I do not like such examples in books - between space limitations and the complexity of real life this and other examples feel too... contrived... to be worthwhile. But I understand that it is included practically as canon, and do not fault the author for its inclusion.
So, all things considered, this text covers the changes in PHP 5 in detail in a surprisingly brief 300 pages (and small page footprint). A worthy addition to a book collection, provided you already have general PHP reference available.