on November 27, 2005
This PHP reference has some extras I liked. It is always good to have a portable and compact programming statement reference at hand. It is even better to have one that goes into more detail where that extra background may be of value. The chapter on the object-oriented programming support in PHP 5 is one of those extras.
I also appreciate the chapters on creating Flash and PDF and the tips on server performance optimization.
PHP in a Nutshell falls far short of adequate in one respect -- the index. A reference should provide a way to find information without having an exact knowledge of the information you are looking for.
Success, yes, but unnecessarily delayed. I would fault this book for that and knock down my rating except for the fact that the index is no worse than the typical computer book index. Decent indexing, and even full-text searches on books, are distant hopes as ever.
Despite my occasional rant on book indexing, this book will be kept in a handy place as I continue forward in my progress in coding PHP.
on June 23, 2006
When I purchase a Nutshell book from O'reilly, I anticipate a very formal, detailed overview of a language and an in-depth coverage of that language's standardized libraries and features. PHP in a Nutshell is very lax with informal explainations and coverage. I am not saying that the book lacks information; it just lacks the typical detail of a usual Nutshell book. This book also has simple errors that should have been caught if the author had reviewed his own work; this is simply unexceptable. I, today, counted over 4 simple mistakes on the chapter about operators. This is something unheard of from O'reilly. I have been programming with PHP for a while now and was hoping to find a definitive reference ... well, this isn't it!
on January 5, 2006
It is a bit more difficult to find what you want in the index than absolutely desired, but it is also the price we pay for a low-cost, desktop reference.
I too am relatively new to PHP. I've dabbled a bit with it over the past few years, but recently started to write my first "major" web-centric application using it and MySQL. I can definitely say that PHP In A Nutshell has not let me down! I've been avoiding learning "yet another programming language," but PHP In A Nutshell has given me the ability to jump into it without needlessly wasting my time.
The author's writing style is very easy to embrace, which makes reading this book a breeze. The author clearly knows PHP very well and provides many, many resourceful nuggets of experience in the paragraphical excursion through this insightful book. It "reads" well and "references" well-enough.
While this book may not be the best tutorial for a total newcomer to programming languages, for anyone with experience in any modern programming language, it should be very easily read and received. How much of this is the writer's style versus O'Reilly's "common sense in book layout?" I'm not sure, but the two blend together well to make a fine wine in PHP In A Nutshell.
The section on databases is well worth the asking price, but I found way more than that to be of real, immediate value to my "emerging" PHP skills. However, perhaps like the other reviewer, I'd like to have a nice little appendix that contrasts the "C" or "Java" way of doing something to the PHP way of doing it as an added benefit that would negate the need for a massive index. Indexing is nearly a lost art today, it seems...only library sciences majors seem to know the first thing about it while the rest of us rely on our word processing software and some manual hacking of its results.
Don't let this "semi-rant" deter you from finding the real value in this book, which is still exceptionally useful but may mean a bit more reading. At least it flys by quickly and enjoyably due to the entire team involved in its production.
While the section on Manipulating Images is really fantastic for content, somehow the "smooth, blue gradient" looses its luster when reduced to gray scale. Yeah, I realize that something has to bite the bullet to be competitive in today's market, but blue skies in grayscale? Oh well, the book is still very excellent and useful. It is the first thing I reach for when I need PHP help. Perhaps someone with hardcore PHP experience may point out flaws that I'd miss, but for a programmer getting going in PHP, I've found it to be a massive, err...in a light and easy way, help!
on July 14, 2007
I am pretty familiar with PHP and worked with it some time ago, but I needed a book to quickly refresh my knowledge of it for a project, and this book did a pretty good job of that. It gets to the point on the right topics (including chapters on OOP, Cookies and Sessions, and Databases) and has a short, useful function reference instead of listing every function under the sun.
Nonetheless, there are many errors both in the code and in the writing. If you don't have a solid foundation in PHP and programming, these errors can really throw you off. Sometimes I would get confused as I tried to figure out why a line of code does what the author says it does only to realize it was an error that made it into print. If the editing had been better and caught these errors, the book would have received a four-star rating from me.
Bottom line, if you know PHP and need a good reference book or a book to quickly review concepts and functions, this book is for you. Don't buy this book if you are new to PHP.
on June 30, 2006
I bought this book to lead me into my first foray into PHP. It was just what I needed, except for one problem: the index. Basic PHP functions such as "print" and "echo" are covered in the text, but you won't find them in the index. The data type "mixed" is used in the code examples, but isn't explained anywhere that I could find, and also lacks an index entry. As others have remarked, there are a few errors in the text, but they're pretty obvious and didn't get in the way of writing workable scripts. An excellent introduction to PHP, but a number of needless annoyances.
on December 15, 2005
This really is an outstanding programming book. However, I believe that the target audience is the semi-experienced php programmer, as many concepts are covered with a light stroke of swiftness that requires prior knowledge of php in order to keep up. That said, there are so many neat tips and tricks and a brief, but excellent section on regular expressions that explains the concept of stored sub matches much better than any reference I have seen - in book or online.
There is also a very good section on how to create images using GD, plus a fairly good explanation of object oriented programming concepts.
I am very happy that I bought this book.
on February 16, 2008
The O'Reilly "in a Nuthsell" series is the best reference to standard libraries and language features available. PHP in a Nutshell sullies the name, however, with what amounts to an introductory survey in the course and little, if any, analysis of standard libraries. Certain tips, such as those on flash and pdf handling are interesting, but irrelevant to most programmers. This goes doubly for the discussion of PHP's 2D drawing API; it seems as though the authors decided they would provide a schizophrenic volume which is on the one hand a beginner's tutorial and on the other hand a survey of the more esoteric, unused portions of the language.
on August 7, 2008
Regarding the Oct 2005 - First edition. I sure hope O'Reilly hires a better proof-reader, and re-issues this book with some basic corrections, and 100% more attention to the index problems.
I think the author did a poor job. A dedicated proofreader should have caught all the errors I have listed. I am only 20% through this book. At this point, this author has built zero confidence in the accuracy of anything he has to present in the rest of the book. I will now proceed to prove where my 'poor' evaluation comes from.
(My background: 25 years of programming, including skills with various machine languages,
assembly languages, Fortran, Pascal, PL/1, C, C++, Java, PHP, and Regular Expressions. )
Stated by the author: "This book assumes you are familiar with variables, lops, and other basic programming concepts [period]." This is incorrect, as other reviewers have noted. The author quickly drifts into examples of arrays, objects, advanced operators, etc. with no explanation, or even a reference to the section of the book that covers these new concepts.
Starting with "The PHP Language" section, I am finding an error or obvious omission, on an average of every three pages. This book has been poorly proof-read, and should not have made it past the publisher in this form. I expect far more accurate text that this, for an O'Reilly publication.
As for the six people whom the author lists as standing out particularly,
with regards to contributing corrections, improvements, and comments . . . I couldn't imagine how bad this work would be without their efforts.
Page 32: Using complex data forms and concepts in examples, without providing page references.
Here, arrays are introduced. Would it be so hard to add a footnote
"See the extensive Arrays section, starting on page 61."?
page 32: Same comment, applied to 'Objects'
Page 32: Same comment, applied to the '->' object operator.
( Page 132: "use the special -> operator". Other PHP documentation calls this the 'object operator', but this author does not use this literal phrase. There is also no index entry for this phrase, or any reference to it under 'operator' or 'object'. )
Page 42: 'Returning by Reference'. This obscure concept really needs an explanation of what is happening in the 5-line example. According to the 'Variable Scope' explanation (ten pages later),
the variable in this function is local, and is therefore not reference-able outside the function.
Yet the description of "Returning by Reference' indicate that the value of the variable is accessible.
Page 45: Introducing the capability of the GLOBALS array, with no caveats, for the purpose of overriding
scope. Ten pages later, in a different topic (Superglobals), we find the warning: "two superglobals that you should avoid ... $GLOBALS...". The warning should be on page 45, where you first start describing this superglobal. Again, has this author never heard of the literary construct called a footnote?
Page 51: In an example, '(int)' is used to typecast a bool into an integer. At the top of the next page, the typecast operation is written in another example as '(integer)'. If both syntaxes are supported, this sure would be a good place to note that.
Page 64: In the example, function_load_member. A $ID parameter is passed, but not used. Probably the "Bob" literal should be $ID.
Page 64: Same code example as above. This two line function has one assignment, and one return statement ('return true;'). The calling code evaluates the completion of this function as if there are multiple
methods of return; i.e. true or false. The text ahead of his example loosely implies that if the function was not 'successful' (whatever that means), the returned boolean will be 'false'.
Page 66: Array_intersect() with multiple arrays parameters. There is no indication if this is an AND or an OR operation, with multiple secondary arrays. That is, will an array1 entry be returned if it is in array2 *OR* array3, or must it be in array2 *AND* array3?
- - -
One thing the author did get correct is in his list of web-sites. The TOP entry is [...] , and it consistently clears up the errors the author makes. I recommend it.
'PHP in a Nutshell' is a fantastic book for learning the ins and outs of PHP so you will be able to start programming quicker, smarter, and better than ever!
Some of the 'Nutshell' books are simply too short to do proper justice for many topics, but that is not the case here. Densely packed into 350 pages, all the yummy stuff is covered here:
object oriented programming
plus all the standard jargon for learning a new programming language: variable declaration, control structures, etc etc etc
If you are going to be programming in PHP (and why wouldn't you, being open source and sooo easy to use) and you want to get a headstart on how to begin doing just that, you owe it to yourself to read this wonderful guide. Well written, and a nice size that is easy to digest, I found this book to be a pleasure throughout.
Buyer beware only that this is not for the savviest of PHP programmers, but the majority will find it well worth the time and money.
***** HIGHLY RECOMMENDED
on January 24, 2007
A decent broad coverage of many PHP basics but I didn't really learn much more than I had found on my own by randomly poking around in the online PHP manual every time I needed a function to get a job done. I was hoping that reading a book like this from cover to cover would expose some parts of PHP I missed or teach some techniques and best practice that I didn't figure out myself. Unfortunately it did not.
For someone who known no PHP at all (and no C) I would give that a 4 star rating. But every PHP programmer has access to great free online PHP manual so I think this book has less value. And anyone who knows C can start programming PHP right away without reading much of anything. I assume the average programmer knows some C or Java and can read the online PHP manual. For those people, this book is no better than 3.