Amazon.com Customer Reviews
A reference every PHP programmer should have - Review written on January 03, 2007
Rating: 5 out of 5
12 customers found this review helpful.
This is my first O'Reilly book in the "Cookbook" series. At first I thought this book would probably contain the code and instructions for building a couple of web applications such as a shopping cart or a blog engine. This isn't that book. Rather it provides the reader with code snippets that can be used as building blocks for all kinds of applications. If I had to describe this book in one sentence I would say it is as if the author took down all the "Hmm..., I wonder how that is done?" questions and created an answer key.
One thing I like about this book is that the authors don't waste the first few chapters trying to teach or give an overview of the language. Instead they hop right into the usage of the language that relates to real world stuff.
So here is a brief overview. The book covers PHP 5 and goes over many of the new and improved features. The first six chapters provide recipes for more basic subjects (strings, numbers, dates & times, arrays, variables, and functions. Again, this isn't an intro to PHP, that is another book such as Programming PHP from O'Reilly. This is that book you reach for once you have moved from PHP basics and are ready to build some real world stuff.
By chapter seven the authors are discussing classes and objects. I like using classes when coding in C++, so this is a good chapter for those who like OOP. The next nine chapters go over web stuff starting out with basic things like cookies, forms, and databases. Then the authors go into more advanced areas like session management, XML, automation and web services (REST, SOAP, Mail, FTP, LDAP, and DNS to name a few).
The next chapter [17] is on the topic of graphics. This is a cool chapter if you like to create dynamic images. Things like creating a button image on the fly, or generating charts. Graphics are great to have a knowledge of because everyone likes graphical presentation of data and this chapter can help you get there.
Chapter 18 is on security and encryption which I found rather helpful. No one wants there web application to be the link that allows data to be compromised, and this chapter deals with many of those problem areas. Chapter 19 covers localization, chapter 20 is on debugging and testing. The debugging section does a great job of getting a person setup with the tools they need to properly debug an application including creating your own exception class. This is an outstanding chapter that every programmer can appreciate since every application needs debugging.
The remaining chapters cover performance tuning, regular expressions, files, directories, command line PHP, PERL and PECL. Being a Perl guy I found it interesting to see how the authors utilized regular expressions in PHP. And the chapter on command-line PHP was outstanding; I thought the recipe for creating a PHP command shell was pretty cool.
CONCLUSION
--
This book is like having the answer key to most of the random questions a person comes up with when writing code. I found this book to be very useful, it will be one of those references that I keep close, and gets very little shelf time. It is a solid book. It is hard to say what parts I liked best because this is one of those books that you like and must have, but then as time goes on and you use it more and more its value grows. This is an excellent book and I would strongly recommend it the PHP users that want to move to the next level.
...but if you want PHP 5, this is the book! - Review written on November 18, 2006
Rating: 4 out of 5
5 customers found this review helpful, 1 did not.
There is no comparison between Wrox and O'Reilly books! O'Reilly wins hands-down!
This 2nd edition of the PHP Cookbook offers real, useful, insightful information. The content is not "just recipes," but a consise approach to everyday problem solving using PHP. The organization of the book exposes this problem solving as a series of recipes that answer particular problem-domain questions. The diversity of the problem-domains accounted for in this text are amazing! If it is web or Internet related, this book probably has an answer for your most demanding PHP needs.
In the fine tradition of O'Reilly books, this text is very well presented, exceptionally well edited and organized in a manner that makes sense to the reader. It is not filled with fluff or hyperbole designed to add page count the way the thick volumes at Wrox seem to do. If you need every little thought spelled out for you, maybe you should buy a "PHP for Dummies" book. Otherwise, you can't go wrong with this excellent, well presented book that truly is "Solutions and Examples for PHP Programmers."
Vague, incomplete, and misleading - Review written on July 03, 2005
Rating: 2 out of 5
14 customers found this review helpful, 7 did not.
This book contains a huge and misleading inaccuracy about a fundamental aspect of the PHP language, an inaccuracy that could potentially cost an inexperienced programmer many hours of frustration. On p. 155 under "Assigning Object References," Sklar says "use the =& operator to assign one object to another."
In reality, the PHP docs go to great lengths to emphasize that in an analogous example "$a and $b are completely equal here, that's not $a is pointing to $b or vice versa, that's $a and $b pointing to the same place." In other words, Sklar is telling readers virtually the OPPOSITE of what's true.
This is not a trivial semantic point. It's a fundamental issue, and if it's misunderstood you can spend many hours hunting down bugs caused by the misunderstanding.
Another major problem is vague language. Here's an example from page 150:
"Besides using -> to access a method or member variable, you can also use ::. This syntax can access static methods in a class. These methods are identical for every instance of an [sic] class, because they can't rely on instance-specific data."
OK, so what does this mean? Is Sklar saying that you use "::" when and only when you want to access static methods? Can you also use it to access non-static methods? How do you know when a method is static or non-static? Is the syntax for defining a static method different as in Java, or does it just depend on how you access it?
I suspect that unclear thinking, lack of talent for explaining things, poor editing, and haste all contribute to this lousy quality.
Another problem, also typical of O'Reilly books, is that there is a fair amount of "hand waving" as in, "here's a light introduction that really gets you nowhere. For further information...uh...see the docs." If I'm paying a lot of money for a tech book, I expect the author to attempt a thorough treatment of the topic, and not just blow it off in the middle.
There are also plenty of typos such as the one in the quoted passage above. Does O'Reilly even bother editing the books they publish?
This book offers real solutions for real issues. - Review written on June 19, 2004
Rating: 5 out of 5
3 customers found this review helpful.
Most books cover commands and functions as though they were disembodied topics and don't relate them to the real world.
PHP Cookbook must be written by a "real developer" because he addresses actual everyday issues and illustrates practical solutions that you can use in your own applications.
I highly recommend this book.
- Hank Castello
compusolver.com
Highly recommened for web developers with basic/intermediate - Review written on December 03, 2003
Rating: 4 out of 5
12 customers found this review helpful.
If you are completely new to PHP, just forget about this book!
If you are looking for complete programming solutions, do so as well!
However, if you have some basic experience with PHP and MySQL this book is just great.
This book deserves the word "cookbook" as it contains over 600 pages of receipts (do not expect big explanations, but just snippets of code), which will help you to solve many problems. And the best of this book - in my personal opinion - is, that by reading it, you will find a lot of problems/solutions/ideas you have not thought about before.
Be warned: This book is not a real "help" for anybody who looks for the easy solution, but it will definitely help YOU to develop your site and develop yourself.
Just buy it - it's well worth the money and if this book won't pay out, none will!
A very good "cookbook" reference - Review written on October 15, 2003
Rating: 4 out of 5
21 customers found this review helpful.
I have been programming PHP for a couple of years, and have lots of books on the subject. IMHO, I felt like this book serves the role of a "cookbook" very nicely. The contents are organized by language function via chapters (i.e. strings, numbers, arrays, regex, forms, classes, db, security, XML, etc...) which makes it convenient to find what you are looking for. Within each chapter, are very specific "Problem" and "Solutions" which contain simple code snippets (like 10 lines or less) and a description of what it does. Most problems are solved within one page. It is really concise and to the point. The index is comprehensive so it is straightforward to lookup the issue you are having, find the problem / solution and get on with your coding. You don't have to read thru lots of code or descriptions of why somebody setup a display template or complicated object. Look up your problem, read a quick solution, and BOOM, you're done and back to implementing it in your code.
I have read some other reviews for this book here that recommend the Wrox book, stating this one is too simple. I don't agree with this. The Wrox book appears to me to be another "... let's show you a bunch of full blown application examples ..." book to me, similar to the classic Welling and Thomson SAMS published text. The "cookbook" will not teach you the language, nor is that its intent; it assumes you know what you are doing.
This book is exactly what it says it is, a cookbook. If you need a quick solution to specific coding problems, at a fairly advanced level, it is a really good reference.
ORA Cookbook Vs. WROX Solutions - Review written on December 16, 2002
Rating: 4 out of 5
116 customers found this review helpful, 15 did not.
I ordered a copy of the "PHP Cookbook ORA", along with a copy of the "Professional PHP 4 web Development Solutions WROX". Upon reading both these books, i thought i should offer a honest review comparing the two:
Both the books were informative in their own right
o The ORA book had small snippets of code based solutions (very similar to the PHP Developers cookbook from Sterling and Andrei) that are very useful for programmers who are confounded with small to medium coding problems. However, there was nothing enterprising about the coverage, that one could not achieve from using a combination of the online docs + mailing lists. Another downside was that i could not find full solutions that i could re-use in my projects.
On the Other hand, i found
o The WROX book offered complete solutions to real world problems - a Simple/advanced CMS (the core of which you can plug into your site), a simple search engine, a classified ads board, and lots of cool creative case study solutions that i could extend to use in my hobby sites. The content was very enterprising and all of the solutions presented are the most popular one's amongst web developers these days. More interesting is that these solutions can be completely re-used and extended into your projects. However, the downside of this book is that you would need to have prior PHP knowledge either picked up from WROX' Professional PHP 4 (as is mentioned as a pre-requisite in the book) or from the Programming PHP ORA, or any another competent professional PHP programming books in the market.
So the bottomline is:
oCare for an appetiser - Pick up the ORA book.
oCare for a full meal - Pick up the Wrox book.
I am posting this same review for both the books (so customers can benefit from it). However, i have ranked the Wrox book, a notch above this one, simply because i wanted a burp:-)