35 of 35 people found the following review helpful
on January 14, 2001
UNLIKE ANY OTHER PHP BOOK. I write that in all caps because I can't emphasize this enough: this is NOT a typical "let's show you PHP" book. There is no walk-from-beginning-to-end introduction.
PHP Developer's Cookbook is for INTERMEDIATE/ADVANCED users that have already had their introduction, already used PHP for a while, and find themselves, while working on a project, saying, "How do you validate an email address?" or "How do we save sessions in a database?"
This is a book of PROBLEMS AND SOLUTIONS, broken into little categories for easy reference. (Look at the table of contents.) Of course you could go through it from start to finish and learn quite a bit, even if you're not working on a big project yet.
All that being said, THIS IS ONE OF THE MOST VALUABLE PHP BOOKS I'VE EVER SEEN, and I've seen them all. It's the only one I'm going to keep on my desk now as I work. It's exactly what I was looking for. (I work on PHP projects all day, and am constantly searching the mailing lists to remember how to create drop-down-menus, how to process individual words in a text file, etc. This book has it all!)
Combine this with the new feature on [...] that lets you type "[...] to immediately look up the manual page for every PHP function, and you're all set!
28 of 28 people found the following review helpful
on January 14, 2001
I stumpled upon this book by accident, and only after 10 minutes of reading, I just had to get it. The book is targeting at experienced php programmers, and assumes good grasp of php and its functionalities. Unless you are have gone through at least one other book (like Wrox's PHP programming) and have had some serious project, you may not fully understand the need for some of these techniques.
For example, php has specific functions written for each database. This cause portability problem of the code when switching databases. We all know a databases API is badly needed, and quite a few books have touched on this topic, but none which actually go through the code and explain in detail how they work, how database wrappers are created and used. Another example is the session handlers. Almost every php book includes a chapter on session, and briefly mentions how we can write our own session handlers, but they read more like a reference book. PHP developer's cookbook, again, actually take you through the steps of create them and how to incoporate them into your scripts. Other examples in this book include: how to interface with other programs and languages(sockets, COM, Java methods and classes). How to work with php images functions, php XML functions, ZEND API.
Again, I wish I have found this book ealier, it would have saved me a bunch of headache and time. I truely suggest this book to any experienced PHP programmers out there.
23 of 23 people found the following review helpful
on January 16, 2001
Have any of you done Perl and worn the Perl Cookbook cover off? Then this is your book.
The layout and general concept of this book is very similar to that other beloved cookbook. Some entries are nearly identical. One feature I adore in particular is multiple recipes for one task, stating which is faster/more efficient, and then telling you why.
I have been scripting PHP for 2 years, mostly professionally, but many fun, personal projects as well. Not only do I wish I had this book, but I am gald that I have it now. I have been reading this thing randomly but voraciously, and I have found little gems even under the elementary topics.
I will be working on 2 major projects soon, the development stage of one has just begun. One is a massive intranet site, (authentication, sessions, customization, etc.) and the other is an ecommerce site/application. I will be using this book continuously as a: 1) code reminder 2) how-to resource 3) code-refiner 4) style-refiner.
I've already used it several times for custom classes - don't pass this one up!
17 of 17 people found the following review helpful
on January 10, 2001
The table of contents is misleading. When I saw, "Working with Strings", "Dates and Times", "Arrays", etc., I was sure I'd wasted my money. Nothing could have been further from the truth. I thought I was pretty good at PHP until I read this book. It was a bit humbling.
In PHP, it's easy to connect to a database, pull out some data, and throw it up on the screen. This can lead to complacency and perhaps cause one to put issues of efficiency and security on the back burner (not that I'm speaking from experience or anything...).
The material here makes the difference between "knowing" PHP and being truly good and professional at it. Wrox's "Professional PHP Programming" is the cake, this book is the icing.
11 of 11 people found the following review helpful
on February 22, 2001
This is the most useful "second" PHP book available. I say "second" because it's geared towards those that understand a bit already but still, it'll even help the complete newbie as it's easy to read and will make sense to most anyone. Excellent tips, short-cuts, examples, etc. Curious about shortening, optimizing and streamlining your PHP code? This book will help. Includes uses of various PEAR classes too (PEAR being similar to Perls CPAN). This cookbook WILL suit your PHP hunger, we need more books like this.
16 of 18 people found the following review helpful
on February 24, 2001
I agree that this book is a worthwhile purchase for any serious PHP developer - it offers a wealth of useful ideas and immediately became the most used resource on my PHP bookshelf.
But there are a couple of weaknesses that other reviews have not touched on.
The main disappointment is the choice of topics coverered - there are some pretty major omissions.
As others point out, this is not a book for beginners - a fair bit of knowledge is assumed. Yet much space is taken up with very basic topics which are well covered in the introductory texts, such as creating a class or opening a file.
While this has the virtue of completeness, it has reduced the space for detailed coverage of the really tough issues that are beyond the scope of the PHP introductions.
Of the more advanced topics, I particularly liked the database API - this is the most elegant and efficient solution I have seen, and is worth the price on its own. And there is plenty of detail on email handling, socket programming and XML.
But other key topics such as form handling, data validation and user authentication are barely touched on. Given that the built-in facilities for error handling are still poor in PHP4, I was particularly disappointed that this issue is not really addressed. Another weakness is the rather superficial coverage of the challenges of building usable and efficient search facilities.
My other concern is the rather condensed coding style. Comments are pretty thin on the ground, and the local variable names are often cryptic. So you sometimes have to work quite hard to understand what is going on.
Overall, a great contribution to the PHP literature, but not as comprehensive as it might be. Perhaps this could be addressed in the second edition??
9 of 9 people found the following review helpful
on December 30, 2000
The description "task-based reference" from the back is right on the money. So many books claim to do this; but few really do it well. And the book does not limit itself to mundane everyday jobs. It picks a good sampling of both simple and sophisticated techniques, walks the user through how the example works and provides a good jumping off point for integrating these ideas into working sites. This is the PHP book I wish I'd had when I was starting out to learn it; but even more than a year later, it's very useful.
8 of 8 people found the following review helpful
on October 4, 2002
I'm not the type of programmer that likes to copy & paste other people's code in my applications, however, every so often I run into problems that I'm not quite sure of the proper way to solve; this book has become invaluable in these cases, whether it is performing HTTP Post requests (hint, use cURL), or parsing data with regular expressions, the book provides a handy reference for all the common and not so common tasks that you might encounter.
One of the things that I really appreciate about the book is that it is written by two PHP core developers, and they often show their knowledge, telling you what goes on behind the scene, offering a variety of different solutions, and then offering the best solution. I've found this information helpful in solving future problems, as I learned what was going on under the hood, therefore, I knew how to optimize the solution.
An excellent book, if you want solutions to problems that you'll constantly encounter, its meant to be a reference on the programmer's bookshelf, not a way to learn PHP (although it definitely has _improved_ my PHP knowledge), ....
14 of 16 people found the following review helpful
on February 5, 2001
It's a good book! It suits me admirably. Starting from knowing no PHP I could code reasonable complex things within a week. However a few warnings to others.
1) It assumes you are an experienced programmer. An if you are not then this is not really the best first choice.
2) It is tasked based. In other words you have to define the task in your mind (like I want to invert a character string) and find where it teaches that. So it is laid out in sections labeled 'Problem' and 'Solution'. eg
Problem: I want to locate a record in binary file and update it in place:
Solution: A chunk of code which solves the problem.. ...often more than one way, then an explanation of how an why
3) It is not a true reference. There are no tables of regular expressions, function lists, special symbols etc.
4) If you know PERL then this IS the book for you as it draws frequent comparison and borrows from your perl experience. If you do not then it will be more difficult. (possibly other list based languages would do just as well)
The above are criticisms in the true sense of the word. For me the book is excellent. Incidentally, it's a pig trying to switch backwards and forwards between PERL and PHP. They are JUST different enough that you keep using the wrong syntax - at least I am during these early days.
7 of 7 people found the following review helpful
on January 22, 2002
Becoming more advanced in the field of PHP programming, I needed a solid reference to help me along the way. This book did just the trick.
It gives problems and solutions to everyday problems that programmers face, and conveniently groups the examples by category, such as strings, arrays, etc.
PHP Developer's Cookbook helped me with many of the tasks that I was currently embarking upon, and looking through its contents helped me find new and better solutions for current and future problems.
A word of warning, however, this book will probably NOT teach you PHP. The categories are not placed in a good order for beginners, but are great for those of intermediate and expert programmers alike. If you are new to PHP, I would say look elsewhere, say PHP Essentials, but I would recommend that you definetely keep this text in mind if you decide to further your PHP skills. Strongly recommended for intermediate and expert PHP programmers.