I hate getting books for review that are written by friends of mine. I have a strict policy that I won’t review a book I don’t like. This leads to awkward conversations if, after skimming the book, I decide not to review it. Thankfully, that isn’t the case with this book. Today I want to talk about “You Want to Do What with PHP?” written by my friend and former co-worker, Kevin Schrorder. (I used to work at Zend, Kevin still does.)
“You Want to Do What with PHP?” isn’t your usual PHP book. I am guessing that even advanced PHP developers don’t have a book like this on their shelves as I’ve never read one that covers quite this variety of material. Kevin talks about a lot of topics that we politely call “Edge Cases” for PHP developers. (in impolite company, we use other terms that are sprinkled with profanity to express the mental instability of any programmer that would do some of these things with PHP) This book guides you through building things like your own stream handler, asynchronous operations and my personal favorite, writing Daemons in PHP. (Yes, all of these things are possible in PHP) These aren’t tasks that most PHP think about or ever attempt; as Kevin points out in the introduction, PHP is most often used for building web applications. However, PHP is a powerful tool and if you dive below its web exterior, you find that you can do a lot more than just build the next social media platform.
This book throws you into the deep-end immediately. Chapter 1, “Networking and Sockets” is intense and Chapter 2, “Binary Protocols” makes Chapter 1 look like a dummies guide. This is not a book that PHP beginners will use, or even enjoy. Not only are the topics highly technical but the examples are not your standard “Hello World” variety. (What do you expect from a book whose first few pages whose first few pages are spent discussing the seven layers of the OSI stack?) Kevin doesn’t ease you into the topics, he assumes a deep knowledge of programming, and at least in the first couple of chapters, networking.
Another problem I have with “You Want to Do What with PHP?” is that Chapter 9, “Debugging Profiling and Good Development” , starts off reading like an ad for Zend Studio. Kevin spends a great deal of time talking about the profiling and debugging tools built into Zend Studio. Given that he works at Zend, it’s easy to overlook this. However, I would have preferred to see equal coverage of xDebug as well. Later in the chapter though, he does delve into non-Zend tools to help with debugging and profiling but this is a glaring omission, especially for those who do not routinely use Zend products.
Other than those criticisms, the only other thing I would say is that this book needs a big red sticker on the cover “WARNING: Here there be dragons.” If a casual programmer pick up this book it would twist their minds into pretzels.
If you are a serious PHP programmer (insert your own replacement for “serious”, Enterprise level, Professional, hard core, etc. ) you will want this book and you will want to dedicate a weekend to each chapter. The style is easy to read, even if the concepts are deep. Some of the chapters are light and won’t take that long to master but once you’ve mastered them, you’ll find that you want to implement them in your own projects.
Chapter 5 is one of the light ones, it covers SPL. Honestly, if you made it through the first four chapters, you probably are already familiar with SPL. If not, the concepts aren’t going to be difficult for you to master.
This is a great book. It’s not a cookbook and it’s not a beginner’s guide. It assume you are a programmer and treats you like an adult. There is a market for beginner books, books that help people learn PHP and build their first web site. However, the list of books aimed at serious PHP developers is very short. I appreciate Kevin and MC Press for helping fill this void.