Kevin McArthur has contributed several articles to this site, so in this blog post I review his recently published book, Pro PHP. This review was originally published on Amazon.com.
As an experienced PHP developer and author myself I was delighted that Pro PHP showed me a number of new techniques that I can apply to my own every day development tasks. This makes me confident that developers of all levels will gain value out of reading this book. I typically like to keep up with recently released books so I know the material that is available, but as somebody who has been programming PHP for almost 10 years I generally don't find new ideas that can be applied to general PHP programming.
Two such examples of this in Pro PHP that helped me are array overloading with the ArrayAccess SPL class and the observer pattern using SplObserver and SplSubject. Firstly, ArrayAccess allows you to access objects (such as reading and writing) as you would with an array. One such example of this is in the PHP SimpleXMLElement class. Secondly, using the observer pattern allows one object to monitor the state of another object and react to these changes as desired. Kevin describes these to the reader and provides solid examples of using them.
An interesting aspect of this book is the chapter dedicated to PHP 6. Although a stable version has not yet been released, Kevin covers the key features that we can look forward to such as namespaces, late binding and native Unicode support.
The other thing that I like about Kevin's style and methods are that they are fairly similar to my own, meaning for the most part I agree with his methods and therefore recommend them to other users as well.
On the whole I would have two minor complaints with this book. Firstly, there is a lot of "conceptual code" rather than practical real-world examples. Having said that, there are so many different ideas in this book that it would be difficult to fit longer examples for these ideas. Secondly, I would've liked to see some more extensive coverage of the Xdebug module. This is a module that I try to use but I feel like I am under using its potential. It is great that Kevin covers it in Pro PHP, but I would've liked to see some slightly more advanced usage for my own benefit.
In summary, I would definitely recommend reading this book, especially if you have been slow to transition from PHP 4 to PHP 5, or if you use PHP 5 but know you don't take full advantage of its Object Oriented Programming features.