Programming PHP 2/e
Rasmus Lerdorf, Kevin Tatroe and Peter MacIntyre
ISBN: 0-596-00681-0, 512 pp.
Sample chapter – http://www.oreilly.com/catalog/progphp2/chapter/index.html
Hi-res graphic – ftp://ftp.ora.com/pub/graphics/book_covers/hi-res/0596006810.jpg
It may be a well known secret that the animals depicted on the cover of O’Reilly books have some bearing on the contents – but indulge me - I’ve only just recognized the fact. The camel on the front of Larry Wall’s Perl book should perhaps have given the game away long ago. Ever thought about the duck-billed platypus on “Web Database Applications”? Well the authors are Australian. For a book on security (“Essential PHP Security”) what better animal than a monitor lizard?
So why a cuckoo for “PHP Programming”? Check the colophon at the back of the book and you’ll discover that “cuckoos epitomize minimal effort” – unmistakably the sentiments of Rasmus Lerdorf (originator of PHP) and a good summation of the character of the language.
This is a revised edition of a book first published in 2002. It’s co-authored by Rasmus Lerdorf, so is perhaps the canonical reference for PHP. In addition to Kevin Tatroe and Peter MacIntyre, the contributing authors include core developer Wez Furlong and security expert, Chris Shiflett. All in all an impressive cast of characters.
Many programmers learn PHP on the fly using the online documentation and code examples. If you fit this description you may question the need for such a book. Well be prepared for a few surprises. When you see all the array functions in one place in an easily readable format you’re sure to discover something new and useful. Quirks of syntax such as variable scoping, are clearly explained. There are probably numerous experienced PHP developers who are still a bit unclear on the use of single versus double quotes and when to use curly braces to resolve complex expressions. You’ll find the answers here.
One of the nice things about PHP is that it supports a variety of different syntax styles. If you come from a C language background you can use that coding style or if you prefer you can use syntax that’s closer to VB.
But the downside of this is remembering all the different options you have. This is especially important if you are considering PHP certification. If that’s the case this book is an excellent resource. For example, to my great surprise, I discovered that the a semicolon is optional before a terminating PHP tag. (I must admit that this didn’t sit easily with me. I had to try it just to be absolutely sure.) Be that as it may, this is just the nasty sort of question that might appear on a certification exam.
This book includes a handy reference to all available PHP functions. Again, this information is available at the php.net site but is a godsend for those who prefer the printed word. It’s so much easier on the eyes and conducive to learning through leisurely browsing.
The application techniques chapter is especially welcome with brief sections on templating, data compression and performance. I only wish it was longer. Wez Furlong’s contribution, the chapter on extending PHP, is an excellent treatment of a difficult topic and the section on installing PHP on Windows is a helpful addition for Windows users. There are no comparable installation instructions for *nix users – but then they don’t need any help, right?;)
This book gives thorough coverage of the basics of PHP and incorporates many of the changes made to PHP in version 5. At over 500 pages it could hardly be accused of skimping. Its principal purpose is to cover the procedural aspect of the language much as you might want to understand C before attacking C++. Consequently, don’t expect an in-depth discussion of PHP’s many useful internal classes or, for example, a discussion of cloning aggregate objects. This is not the job this book sets out to do and happily, there are other books that cover this topic.:)
About the Author
Peter Lavin runs a Web Design/Development firm in Toronto, Canada. He has been published in a number of magazines and online sites, including UnixReview.com, php|architect and International PHP Magazine. He is a contributor to the recently published O'Reilly book, PHP Hacks and is also the author of Object Oriented PHP, published by No Starch Press.
Please do not reproduce this article in whole or part, in any form, without obtaining written permission.
Copyright © 2018 softcoded -
the Toronto web design & development company