PHP Pocket Reference, Second Edition
By Rasmus Lerdorf
Second Edition November 2002
Series: Pocket References
ISBN: 0-596-00402-8
144 pages, $9.95 US, $14.95 CA, £6.95 UK
Rating: :) :) :) :) of 5
This is a very good small concise reference to PHP 4. Most of the book consists of a summary of the basics of the PHP language plus a function reference to about 1400 PHP functions. If you are in need of a handy reference to PHP 4, this pocket reference would be an excellent companion for "Programming PHP" (which is a fuller reference to PHP and is also published by O'Reilly).
I would not get this pocket reference unless you are already somewhat familiar with PHP and already own "Programming PHP" (or rough equivalent). This book, though well written, is not designed as an introduction to PHP. Oh, and you need to be OK with it not covering PHP 5.
If you want more detail, you could take a look at my somewhat longer review.
George of Oakland.pm and Camelot.pm
This book is on Safari Technical Books Online.
PHP stands for PHP: Hypertext Preprocessor. ;-)
PHP
There have been several versions of PHP. The versions you definitely need to be aware of are PHP 4 and PHP 5.
PHP 4: PHP 4
PHP 5: PHP 5
Languages: I've made significant use of over 20 different computer languages. Not surprisingly, I'm good at learning computer languages.
O'Reilly: I own many O'Reilly books. I am generally quite satisfied with them. I'm a fan of O'Reilly.
Perl: I've been using Perl since 1994. My favorite language by far is Perl. Over the years, I've written a number of Perl CGIs.
PHP: I've only recently started to use PHP and have only used it a little. My ISP does provide me with PHP 4 and it is now enabled for my domain. I own "Programming PHP"; I've read it and reviewed it.
Webmaster: I've developed a number of websites and am currently the webmaster of several non-profit sites. I am definitely not a professional webmaster.
Title: The title is "PHP Pocket Reference" so I expected this book would
Cover: There are other things on the cover besides the title.
Based on the words "Creating Dynamic Web Pages", I figured there would be more in this book than just syntax and that the choice of material would reflect these words.
I haven't seen the first edition of this reference, so I didn't have comparative expectations. However, based on the words "Second Edition", I did expect that this book wouldn't have serious flaws, since they presumably would be eliminated by now.
Based on the words "Covers PHP 4", I expected this reference would cover PHP 4 and that it would not cover PHP 5.
Online Catalog Entry: As of 2005-06-20, the online catalog entry said a couple of things that were relevant to expectations.
Based on the words "PHP 4, the language's latest version", I might have concluded that PHP 4 is the latest version of the language. However, I did not because I was quite aware of PHP 5.
I made note of the words "It is both a handy introduction to PHP syntax and structure," but was uncertain what to read into them. These words do not imply, nor did I expect, that this book could serve as an introduction to PHP.
The general idea is that I got a small, concise reference for PHP 4.
Parts: The book includes
There actually is a section called Function Reference. There are no actual Parts or Sections entitled PHP Language Basics or Other Stuff; those are my names.
PHP Language Basics: What I refer to as PHP Language Basics includes sections on
Function Reference: The function reference contains around 1400 entries.
The entry for each function includes
That's all there is in an entry.
Other Stuff: By Other Stuff here, I mean the two sections at the start
and two later specifically web-related sections
What I Didn't Get: PHP 4 isn't the latest version of PHP. So I didn't get a reference for the latest version of PHP as implied by the online catalog of 2005-06-20.
Language Basics: I found this part of the reference to be quite useful. It was especially useful for reviewing what I had learned from reading a longer reference, "Programming PHP".
Some of the things I benefitted from reviewing were
Of course, these will likely not be the things you need to review.
Function Reference: The Spartan entries for each function (see earlier for what's included) work for me. If I need examples, etc., I'm OK with looking elsewhere. I vastly prefer having the entries as they are. One of the advantages is that I can more easily get a sense of the range of functions. Another advantage is that it helps keep the book small while still allowing a large number of functions.
Introduction: I think the introduction could be stronger. For example, the intro refers twice to "the web problem", but doesn't say what it means by that. It wasn't clear to me.
Function Reference: As indicated in the previous section, the Spartan entries for each function work for me. But I gather from reading other reviews some people found the entries inadequate for their purposes. I guess it depends on the individual.
Latest Version: When I looked at it in June 2005, the O'Reilly on-line catalog for this book referred to PHP 4 as the latest version of PHP. Doubtless that was true when the book was published in 2002, but it's not true today.
For: I would say the book would be best for someone who
Not For: Some good reasons for not getting this pocket reference are
This is a really good small concise reference to PHP 4. It covers mainly PHP language basics and a large number of PHP functions.
If that's what you want, go for it.