PHP Book References
 

Feature: Finding the right PHP documentation
Credit: Imagenation

In the world of PHP finding the right documentation can be the real trick because the language is so rich. Fortunately the good folks at PHP.Net have done a superb job of getting a new, comprehensive set of Windows-based help files (nearly 6MB in size) out the door in Fall of 2002 which helps. But for Linux, on-the-John and users who must have paper, New Riders has put out a very compact, PHP Functions - Essential Reference by Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch.

This book has two virtues going for it. First and foremost, it is about half the size and weight of some of the other admittedly heavyweight "Bibles" we have been recommending. So weightlifting merit badge will not be required to tote this tome around. Second, Greant and company have managed to cram an awful lot of PHP functions into 750 pages - well over 800. They cover such basic topics as arrays, calendaring, Class/objects, filesystem, math, MySQL, networking, session management, string, syslog, URL and XML functions - the heart of PHP functionality is well covered off.

And in the many extensions to PHP, the authors have added judiciously such topics as CCVs,Connection Handling, LDAP, ODBC, Pspell, Regular expression, Semaphore and shared memory, Tick/URL and WDDX functions. In short, users get a fairly detailed (but not absolutely comprehensive )tour of PHP

But even more important, the layout of the reference is different and clever. Instead of the usual alphabetical listing of objects, classes, methods, and functions; the authors have grouped these topics into categories - the very arrays, calendaring, regular expression categories noted above. At the front of the reference is page number reference to each category so readers can quickly find all they need to know about variables or strings or LDAP in PHP. If they need to see a specific object or function the well laid out index in the back makes finding a specific object very easy. Finally, despite its publication in Fall of 2001, the Toronto public library copy is already very well worn.

Learning PHP5 by David Sklar - OReilly Press for $30US


Avoid this book if you want to learn new PHP5 features!


Learning PHP5 is a great big misnomer - this really should be titled "Introduction to Basic PHP programming while using the new PHP5 interpreter". There is really very little coverage of PHP5's new features other than to show users the very obsolete steps involved in installing the beta version of PHP5. What this appears to be is a bit of a sham - PHP5 is the latest and greatest - lets glom onto that with a few words on getting PHP5 into action - what you really need is the book below, Upgrading to PHP 5. Shame on OReilly's editors for such a crass ploy.

And it is really too bad because the subtitle to this book really catches its true character - "A Pain-free introduction to Building Interactive Websites [using PHP]". I have both the Bible and the Master Series books on PHP - but what one really needs with PHP is a run through the key concepts of the language. There is a pretty good starting tutorial on the PHP website and look to our own PHP Links and References for the heavy detail ( and there is lots of that with PHP). But this book certainly delivers an easy to understand overview of PHP.

But PHP also needs a a good programming overview into not immediately linked to MySQL and getting a database running - Learning PHP[5] is just that intro. It start off with the basic syntax and emphasizes arrays and functions early and in detail. Then there are important chapters on cookies and sessions, handling dates and times (this is a huge topic with dozens of functions), working with files plus the important topic of parsing XML and the simplified methods available with PHP5.

If you are still looking for a good intro to PHP (but not all the PHP5 new bells and whistles), then don't buy the new book at $30 but rather get one of the second hand copies available at Borders or Amazon.

Upgrading to PHP5 by Adam Trachtenberg - OReilly Press for $30US

Upgrading to PHP5 is the real deal - its topic is getting PHP developers used to the new OO world that is PHP5. And the book, following PHP's own OO tutorial emphasizes simple, but effective CLI like examples of OO definitions and then simple code with <?php print $thisobj . "is the value" ?> test examples. It works.

But just barely - because for the important topic of OO, Adam is done in 29 pages. We do see some use of OO later in the book; but I had expected more comparison with PEAR routines or samples of OO used in popular PHP apps. The biggest section is on database connectivity to MySQL with a whole new set of extensions, SQLite the personal database (do not use this for concurrent database operations, table locking is the preferred method for concurrency control) and Oracle's new extensions get the most coverage, about 90 pages in this 300 page book. Continuing the PHP tradition, each database has its own native call format - so ADOdb, PearDB and other standard database access frameworks should get more coverage than the single page references.

The two next biggest sections are on XML and the new exception handling syntax and functions. Both sections get he attention they deserve because these along with the new OO capabilities are the make or break capabilities of PHP5. They put PHP on a much more solid foundation for secure and reusable code. The added SOAP and Web Services capabilities add to this opportunity set for PHP.

In general this books does a good job covering all the advances that are in PHP5 - this is an enormous upgrade; something that the Perl people have floundered on. But I could not help but ask for more. Not just the OO coverage, but also only one major coding example. But even more frustrating were the install instructions for both PHP and the MySQL with PHP. Both proved inadequate for Linux and Windows installs. So this book is 6.5 on 10 - it certainly gets PHP users started (but not well given the missing details on install) and appreciative of the nature of the changes in PHP5 but it is a bit short on adding details and insight. Strange - I have never seen O'Reilly miss top notch on two books in a row.

Now as for web references for PHP - there are an abundance of riches. Here are our favorites and a quick explanation as to why:

PHP.NET - the starting place for news, views, events, and links to all things PHP
Hotscripts - over 11,000 PHP scripts, most free, and very well classified and rated
PHPBuilder - the digested news and articles here mix well with scripts and tips.

 

Top of Page  Tutorials Home