We are currently not accepting new clients. Thank you to the many great companies we have worked with over the years!

StoreFront Consulting


StoreFront Consulting provides eCommerce solutions to small and mid-size businesses

Book Review: PHP In a Nutshell

  • Garth Brantley
  • 02.23.2009
  • Book Reviews
PHP In A Nutshell Book Cover

I found myself getting into the PHP game rather late and needed a book to go to for the basics. I have been programming in languages derived from C syntax for over a decade and a half now (C/C++, Java, C#), so I figured I could come up to speed with PHP rather quickly. My assumption turned out to be correct and PHP In a Nutshell turned out to be my guide book and go to reference for basic syntax.

Last summer I began customizing some eCommerce sites built on the Magento open source eCommerce platform. Magento is implemented in PHP and makes heavy use of the Zend Framework. I purchased Practical Web 2.0 Applications with PHP to learn about the Zend Framework and integrating PHP with spiffy Ajax enabled interfaces. After reading this, tinkering with some code and a bit of googling I found I was able to read and modify your basic PHP code. PHP does borrow most of its syntax from C/C++, so this wasnít too much of a challenge.

So PHP is not hard to read / write if you are already familiar with HTML and some C-derived language. That said, there are quite a few bits of syntax which are new and unique in PHP. New operators, variable variables, etc. Plus PHP is a dynamic language (see†Wikipediaís entry for Dynamic programming language†for more information), so the semantics donít work quite like C/C++ either. What I needed was a quick reference to all of these little details. Of course I tried the official PHP docs first. These definitively cover the material I was after and the User Contributed Notes are great to get some tips about real world applications or read some in depth posts about fine details about some particular language feature. But I didnít find the online docs easy to skim quickly and they werenít clear and concise enough for my needs and my taste.

Essentially I wanted to spend a few hours one afternoon skimming some resource and dump 90% of the PHP language into my brain. The resource I ultimately settled on was PHP In a Nutshell and I was quite pleased with the result. To say this book is clear and concise hits the nail on the head. I was in and out in a few hours and was well on my way to being a PHP expert.

All of this is not to say that the book is perfect, however. I usually have no problem finding fault, even in things I love, and I had no problem doing so here. The chapter devoted to object oriented programming (OOP) in PHP tried to be all things to all people. That is, it tried to introduce OOP from scratch, show the differences between PHP 4 and PHP 5 and also to provide a reference to the object oriented features of PHP. All three of these goals were comprised, and I believe the end result is not of much use for any of the three purposes. Given the overall scope of the book, I believe it would have been best to assume anyone reading the chapter was already familiar with OOP and to provide a reference for these folks. Those seeking to learn OOP in general will be much better served by other books.

Overall rating: 8 out of 10

Ready to Start? Let's Chat