PHP Cookbook (Cookbooks (O'Reilly)) Reviews



Amazon.com Customer Reviews

Just what I wanted - Review written on March 02, 2008
* * * * *
Rating: 5 out of 5

I'm coming to PHP with a strong background in Perl and this book is perfect for me. In my mind, I know what I'd do in Perl to handle a given situation. With PHP Cookbook, all I need do is turn to the table of contents, find the section I need, and there's the solution. The code is well written and the descriptions very useful.
Yes, it's a GOOD buy - Review written on December 12, 2007
* * * * *
Rating: 5 out of 5
1 customer found this review helpful.

This review is for the 2nd edition and I got a copy from Amazon for a really good price. The time it already saved me from having to 'think' was more than worth the price. I did download the source from O'Reilly. It a very good source of usable working code that you can just 'cut and paste', and you might find yourself learning something here.That is what it was intended to be.
Must have for all PHP developers. - Review written on May 15, 2007
* * * *
Rating: 4 out of 5
4 customers found this review helpful.

I find most technical books impossible to read from front to back. I typically just use them as reference books. Unfortuanately most techbooks aren't organized with this in mind. That's why I love the cookbook series. They tend to contain far more example code then typical programming books and are ideal reference books. The PHP Cookbook is an excellent resouce for PHP novices and experts alike. PHP Cookbook (2nd Edition) is exactly what you would expect from a O'Reilly's cookbook. Everyone reguardless of skill level will feel they hit the jackpot with this book because it has tons of sample code and examples that explain how to do just about anything imaginable in PHP.

The chapters are organized according to topic and each subsection is basicly a short how-to comprised of a problem, solution and disscussion section that explains the solution in detail. Topics include XML, form handling, database interaction, session management and a lot more. I find all O'Reilly's cookbooks to be extremely useful and PHP Cookbook is ceartainly the most useful PHP book I own.
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.
PEAR DB - Review written on December 07, 2006
* * * *
Rating: 4 out of 5
3 customers found this review helpful.

This is basically an excellent book. A lot of very useful stuff. Unlike the online PHP manual, it is on this technology called a book. This comes in handy on say a NYC subway train, where you want to brush up on some PHP, or find the solution for something you are working on.

One major warning though: all the database stuff (about 20-30 percent of the book) depends on the PEAR DB class. That is a great thing to use as are many of the PEAR classes. But there is certainly great PHP code that doesn't rely on PEAR DB.

Besides the db stuff the book has great examples with strings, numbers, I/O (files and directories), dates, etc. And being that I used to be a Reptile Biologist - you got to love that Iguana. If nothing else, just buy it for the cover.
...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."
Any professional PHP user needs this. - Review written on November 07, 2006
* * * * *
Rating: 5 out of 5
2 customers found this review helpful.

Web developers might already know PHP, but this updated second edition of a classic still remains an important desk reference to solving common problems and coding obstacles. PHP is used on millions of web sites today, so its depth and applications hold many possibilities for confusion as well as opportunities for optimization choices. PHP COOKBOOK covers all angles, from processing XML and obtaining solutions to common applications problems to working with JavaScript interactions. Any professional PHP user needs this.

Diane C. Donovan
California Bookwatch
Good reference - Review written on September 01, 2006
* * * *
Rating: 4 out of 5
4 customers found this review helpful.

(My review refers to the 2003 edition).

This book has loads of information about stuff you do on a normal basis with PHP, including XML parsing, form processing, string and array manipulation, etc. I think the book is well written and indexed with good examples, but I think you won't get much more information than the PHP user manual.

In my opinion PHP has better free user documentation than all the other languages I use on a regular basis (Java, Ruby and PERL). You can download their user manual and PEAR manual in a whole bunch of formats, including CHM, which gives you the ability to browse it like any other Windows help file (which gives you the ability to search). Most of the points in this book are covered in the same depth in the PHP user manual and you don't have to pay for it.
Great Reference Book with excellent examples! - Review written on December 12, 2005
* * * * *
Rating: 5 out of 5
5 customers found this review helpful.

You need a solution to a problem? This book will give you the answer. This is a great reference book that helped me a lot and I think that every PHP programmer should own. This book is the next best thing to searching Google for PHP answers where you can find a wealth of information. The examples are very useful and the flow of the book is perfect. When I bought this book it was expensive but it was worth every single penny.

You need to know the basics of PHP coding before this book is useful. But if you know at least the basics you are going to find this book to be your best PHP teacher.
Solid and a good resource for PHP coders - Review written on December 06, 2005
* * * *
Rating: 4 out of 5
1 customer found this review helpful.

I read reviews here on Amazon, and I usually see the "perfect for on your desk reference"... well, I have a shelf near my desk and this book doesn't spend much time collecting dust. There are some really good examples and code, some which may seem overkill (depending on your app and goal).

This is the book I open to see if there's an example or just to purge ideas/code from.
Good information - Review written on September 21, 2005
* * * * *
Rating: 5 out of 5
1 customer found this review helpful, 1 did not.

Well written and easy to understand as is typical of the Sklar books
Great book but desprately needs an update! - Review written on August 23, 2005
* * *
Rating: 3 out of 5
6 customers found this review helpful.

This is a good book for learning how to use the tools PHP provides. However, in 2005, the tools are out of date... For instance a lot of the XML parsing has been updated so the code in the book is largely deprecated.
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?
Allow Unix scripters to learn PHP in record time. - Review written on February 05, 2005
* * * * *
Rating: 5 out of 5
2 customers found this review helpful.

This book, utilizing O'Reilly's cookbook format, starts each chapter with common tasks and describes nearly every aspect of PHP required to perform the task. I have previous Unix scripting experience and I was quickly able to develop quality PHP applications in a very short amount of time. The cookbook format allows me to easily return to important sections for refresher information.... thus making this a great learning tool and an excellent reference.
I am so lucky to have found this book - Review written on December 03, 2004
* * * * *
Rating: 5 out of 5
7 customers found this review helpful.

I have never written a review before, but I felt that I needed to put my 5-star vote in as my small token of thanks to the authors. So here it goes:

I have dabbled in PHP for a few months now, but am developing a php/mysql app for the first time. I refer to this book every single day. It's my favorite Oracle. I ask, it answers:

"How do I $MyDailyQuestion?"
"See page $MyDailyAnswer."

Sure puts a smile on my face!

This book does not make me read through pages and pages of code and explanation. Just enough code snippets and the most insightful reminders to help me solve my daily how-do-I's. It also tells you where to look up further info for each function/feature on-line.

I think you would love this book as much as I do if:
- you are somewhere between PHP super-newbie and super-master
- you have a pretty solid background in some other language
- you are using PHP now and have problems to solve everyday
- you learn well from small examples
- your vision starts to blur when presented with long chapters

My thanks to authors Sklar and Trachtenberg! Happy hunting.
great php book - Review written on September 30, 2004
* * * * *
Rating: 5 out of 5
3 customers found this review helpful.

Full of usable real world examples. Combine this book with some of the great php community web forums and the php.net manual and you are all set.
While I did find some errors in the book, a quick email to the publisher tended to get a quick response and one good thing about O'Reilly is they maintain a list of confirmed errors on the book webpage along with downloads of all examples.
In general its a great book for someone who knows programming and wants to pick up php, but probably not for the beginner who knows nothing.
The book's weakest point is probably dealing with objects and classes.
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.

Filled with GREAT examples - Review written on June 25, 2003
* * * * *
Rating: 5 out of 5
8 customers found this review helpful, 1 did not.

This book has been a lifesaver for me. As is the case with all those in the Cookbook series, this book is filled with practical examples. This isn't a tutorial book, but honestly, this book combined with the online docs were all I needed to build my own web site based around PHP. I definitely encourage you to buy this book if you're hoping to learn PHP!
A valuable asset for any developer - Review written on May 03, 2003
* * * * *
Rating: 5 out of 5
14 customers found this review helpful, 1 did not.

An excellent cookbook, following the old O'Reilly's tradition in the field. The recipes are clean, concise and elegant; the authors try to solve real world, common problems. Unlike other outdated books, the code is designed with PHP 4.2 or above in mind. A valuable asset for any developer, it assumes a decent understanding of PHP
WITH SOME DRAWBACKS, BUT STILL A GOOD BOOK - Review written on January 30, 2003
* * *
Rating: 3 out of 5
9 customers found this review helpful, 2 did not.

The main preoccupation of this book is finding solutions to common PHP programming problems. It contains a series of instructions on how best, programmers and/or web designers, who monitor dynamic web contents could apply scripting language. This book would arouse the interest of anyone who already knows the fundamentals of PHP.
Its main drawback is that it is overtly abridged. Fledging PHP followers may criticize it for lacking the type of depth and practical application that non-advanced learners would want. Still, it is not a bad book to spend your wad on.
combo offer?? - Review written on January 15, 2003
* * *
Rating: 3 out of 5
17 customers found this review helpful, 12 did not.

This book is a collection of smallish code snippets that don't go into depth, but may be useful for your programming needs if you have very basic PHP knowledge.
If you want a truly indepth cookbook with
full blown practical solutions that you
can reuse in your own applications, then
you must own a copy of the "PHP web development
solutions" book from Wrox.
I won both these books, and i have benefitted from reading the two...
Best Book on the Market - Review written on January 11, 2003
* * * * *
Rating: 5 out of 5
4 customers found this review helpful, 9 did not.

Comprehensive and well-written. Has great depth and creative case study solutions. Sklar and Trachtenberg 's PHP Cookbook has more to offer than any other book on the market.
Real Coders, Real Code - Review written on January 07, 2003
* * * * *
Rating: 5 out of 5
8 customers found this review helpful, 3 did not.

Sklar and Trachtenberg bring a great depth of programming experience to this incredibly useful cookbook. The clever code concoctions presented here have been refined by them in massive, real-world applications serving millions of users. If you have used some of the best sites ever delivered on the net, you have probably already used thier code. If you want to know how it is really done, buy this book!
Brilliant - Review written on January 01, 2003
* * * * *
Rating: 5 out of 5
3 customers found this review helpful, 5 did not.

Like having the professor at my side. Articulate. Full of good ideas and helpful explanations. Must have for programmers!
Truly helpful! - Review written on January 01, 2003
* * * * *
Rating: 5 out of 5
1 customer found this review helpful, 4 did not.

Great book! Full of helpful info and easy to understand. Wonderful asset to have.
Cookbook's galore - Review written on December 21, 2002
* * *
Rating: 3 out of 5
3 customers found this review helpful, 8 did not.

Among the PHP cookbooks in the market today, this one's good but lacks sufficient depth in coverage. It unfortunately has nothing more to offer than the PHP developers cookbook (II Edition). Infact,i found the latter to be more comprehensive and well-written. Another book, that is not actually labelled a cookbook, but is chockfull of completely re-usable solutions for web developers is the PHP4 Web Development Solutions book.
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:-)

Sklar and Trachtenberg's Expertise Shines Through - Review written on December 12, 2002
* * * * *
Rating: 5 out of 5
8 customers found this review helpful, 2 did not.

There's really no other way to describe "The PHP Cookbook" than to point out that Trachtenberg and Sklar are obvious experts in their fields. Easy to read, concise and simple to understand, this coding cookbook provides a soup-to-nuts approach to PHP. With just an average understanding of computer code and the will to learn an exciting new approach, "The PHP Cookbook" is a choice guide for those interested.