Programming
Article

Advanced PHP Programming: George Schlossnagle

By Harry Fuecks

Been meaning to say this for a while now but George Schlossnagle’s book – Advanced PHP Programming is excellent. This isn’t meant as an extensive review but rather some thoughts, in reverse order to the books contents page…

– The coverage of Zend internals and extending PHP is the best I’ve seen (PHP has been badly in need of this) and was my reason for buying it. Not only is the “how” of extending PHP explained; there’s also detailed discussion of the Zend engine, the PHP execution lifecycle and so on, I believe based on George’s experiences with apd. Even if you’re not planning on writing your own PHP extension, there’s some valuable insight which can help influence the design of your PHP apps, particularly where performance is concerned. Knowledge of C is assumed (otherwise it would be a very big book), so be warned, but think George has succeeded in proving this misappropriation of the Tao Te Ching wrong (someone please kill it). While I’m on the subject of PHP extensions, there is another book, Building Custom PHP Extensions serves as a useful reference (probably not updated for PHP5 yet though) but lacks insight and explanations.

– Discussion of performance issues and scalability play a very big part, George having unique insight from sites he’s worked on. To an extent, I almost want to dispute the title – “High Performance PHP” might almost be better. As well as much open ended discussion of issues like caching, a significant part of this discussion looks at supporting technologies that help a site handle high traffic; finding them examined in a single book as part of a “big picture” is something else that makes the book special – even if you don’t work with PHP, it’s worth a read if you’re in position of having to run / develop web apps exposed to serious traffic. The bottom line is, again, it’s the only material of it’s kind right now for PHP. To get a taste of what to expect, it’s worth reading George’s recent article over on the Oracle Technology Network: Scaling Oracle and PHP.

– The first section of the book examines what I’d call “development practices” and where most talk of PHP itself happens – subjects like coding standard, OOP, CVS, unit testing and so on. George “dares” to use Smarty and PHPUnit, which probably won’t please everyone but the concepts are transferable.

The style of the book is discussion and “enablement” rather than step by step solutions. The chapter on caching, for example, never reaches “the answer” (is there one?) but provides looks and many different approaches and where / when they make a good choice.

It’s probably not a good place to begin coding PHP with unless you’ve already had experience of other programming languages. You may also find yourself all dressed up with nowhere to go, once you’ve read it (i.e. hunting for an employer with a high traffic site) but even if you’re not able to put everything it offers into practice, there’s a ton of ammo to fire back at that Java developer who makes snide remarks about PHP.

Overall, Advanced PHP Programming is on a par with the Redbooks and is a much needed addition to PHP’s bookshelf. As John puts it; “George, you the man!”.

  • http://www.phpcomplete.com/ jasonlotito

    My favorite book on PHP Extensions:

    Building Custom PHP Extensions
    http://www.amazon.com/exec/obidos/tg/detail/-/1411601882/
    ISBN: 1411601882

  • http://www.purelyartistic.com AWilliams

    Gotta agree with you. I picked this up around two months ago… it’s great. I’ve learned quite a lot from it.

  • anubishh

    “Advanced PHP Programming” Is the best book I have ever read. It discusses many advanced topics that I have been badly in need for, Design patterns, scaling, best practices and full with real life examples :)

    Thanks for this great book!

  • Nikobass

    Any others book suggestions than this one for the ppl who wants to read more on extensions and advanced php programming ?

  • http://www.scisoft.cz/ scisoft

    They just translated it there – gotta to buy

  • Arjun Jain

    Do any of these two books talk about building C++ extensions?

  • Sajith M.R

    Hello,
    Now web 3.0 is also coming with same impulse of web 2.0. Then the advanced php program must need a vision on web 3.0 architure also.

    Regards
    Sajith

Recommended

Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in Front-end, once a week, for free.