I picked this book up at my local library since it was the first PHP 6 book they carried. I have to say, I completely agree with Michael Diamond's review. This book is why PHP code and PHP coders have a bad name. I would absolutely not hire someone who wrote any code like the examples in the book. The book is full of examples of how to make completely broken, utterly insecure and just downright awful PHP scripts. Throughout the book, examples take user input directly from $_POST or other user provided variables and either call functions provided in the variable, use the variable directly in SQL.
If the code could throw a warning, it is often preceded with an @ sign, which in PHP just suppresses the warning. Rather than show or explain to the reader how to either prevent the warnings from appearing, checking code to make sure the values passed to the function won't cause a warning or any of the other correct, standard, and not dangerous ways of preventing warnings from showing to the user, it just includes the @ sign with no explanation.
Throughout the book I don't recall seeing a single place where array variables are accessed correctly. For example,
if ($_SESSION[valid] != 'Yes') ....
Unless the word valid is a defined constant, PHP will try to find a constant with that name, not find any, issue a notice, and then try to use valid as a string. The correct way to do this check would be
if ($_SESSION['valid'] != 'Yes')...
Additionally, for a book that is supposed to be about PHP 6, very little PHP 6 is actually discussed anywhere. Unicode will be one of the biggest additions to the PHP 6 code, yet the only place that even mentions unicode is page 68 which has a little 3 line text box. The text in the box mentions that with PHP 6, unicode will be on by default, and then tells you how to disable it by changing an ini setting!
The code examples in this book are aimed at a beginner PHP programmer. However, a beginner PHP programmer may not know how wrongly they are being presented. I urge you, if you are a beginning PHP programmer to avoid this book. If you are a beginning programmer, avoid this book. If you are an intermediate to expert PHP programmer, avoid this book, or borrow it and laugh at the horrible examples of how to not code PHP.
I read a lot of PHP books. Since I've been coding PHP since 1997, there's usually not a lot that I learn from the PHP books. However, I usually also don't have such a strong reaction against a book that I have to immediately write an Amazon review urging others to avoid a book. In fact most of the other PHP books I've read or own do have a lot of good.
Please, stay away from this book. If you don't know PHP already, it will ruin you as a PHP programmer.