PHP Master: Write Cutting-Edge Code

PHP Master Cover ShotThis book, which I wrote with co-authors (and friends) Davey Shafik and Matt Turland, is a mid-level text for existing PHP Developers to raise their game still further. It's not a beginner text, but covers a nice selection of topics which are building blocks to being able to build advanced, robust applications.

There's a chapter on OOP, beginning at the very beginning and then taking a tour through the finer points of the language. Most importantly, it shows how and when to use the various features, and has working code examples to accompany it. To follow on, there's also a chapter on design patterns, also with real examples, and a later section on SPL which is a great way to build elegant object-oriented code in PHP.

One thing I often find myself working with developers on is their databases, data structure and also how to actually talk to the database efficiently. The book has a chapter that covers both aspects, how to normalise data and then how to work with it from PHP using PDO.

Performance and security are both covered, along with a comprehensive chapter on testing. We also added sections on using PEAR and PECL (since all the authors were referring to these!) and a chapter on auxiliary tools to use with PHP; source control, deployment tools, static analysis, and so on. These are all standard tools for experienced developers, but if you study only PHP code, you might not come across them and we were keen to give a solid base for developers to learn from.

As we move into the age of data, interoperability between systems becomes increasingly important so the book includes a chapter on APIs (and rather a large one at that, it was my chapter and even after severe editing, there was still a lot I wanted to say!). This will show how to work with various different kinds of service and the different data formats we often use, and also gives a good grounding in HTTP which is, in my opinion, absolutely key to really understanding this topic.

All in all, getting together with some peers to work out what we'd tell someone who isn't a beginner, but wants to learn and can handle some quite heavyweight technical ideas, was a lot of fun and personally I think the topics list covers it all quite nicely. I'm recommending this book to everyone looking for an up-to-date text bringing their development skills up a level in a good, all-round way.