533 pages of horrible PHP and 31 pages of index
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.
Good Book, Bad Screen Captures
I have to say that I have not purchased this book but am going to. I Went to my local bookstore and had a chance to look at the PHP 5 and PHP 6 books and the screen resolution the screenshots were taken in the PHP 6 book was really high. The text in the screenshots are really hard to read. I had a chance to look at the PHP 5 book and they were alot bigger. If you have a hard time reading small text I would suggest that you get the PHP 5 book.Other that that the content looks superb.
This Book Is The Reason PHP Programmers Have A Bad Name
This book tries to teach PHP with an illogical ordering, piss poor documentation, no regard to security or standards (it's being published as a book for PHP 6, but still uses HTML from the 1990's).
Most notable to me, however, was the god aweful piece of code found in one of the introductory chapters which, if ever put on a live server, would open up the server to any number of exploits, including access to the system() function. Here is an excerpt:
echo $result = $_POST['func']($_POST['text1']);
Yes, that's right, output the result of a function call the client provides, applied to a parameter the client provides. Absolutely ridiculous.
Now, I haven't read much further than this example (p 110), but even if somewhere later on the authors take the time to discuss security, the fact that they separate the two all but guarentees that the message is not getting across. Please, please please do not purchase this book. I am returning it today, and I encourage those of you who made the same mistake I did to return it as well.
A far, far better book which covers PHP and MySQL in a professional, secure, and yet introductory fasion is PHP and MySQL Web Development (4th Edition) (Developer's Library). This is far and away my favorite programming book, and I promise anyone who is interested in learning PHP or MySQL will benefit from this book.
PHP Fast and Broken
By now you would think Meloni could/should get it right. No such luck her code is still broken. How anyone can write a series of books and still can't code herself is beyond me.
One of the best "teach yourself" technology books
I've been a computer guy for years. I've used Sams, Wrox, and Deitel for various aids.
This book is perhaps one of the best "teach yourself" books I've ever used.
I'm brand new to PHP (but not to HTML)
This book explains new concepts in an simple fashion (without demeaning the reader).
Regarding the PHP version this book uses.
Obviously, the book is intended for PHP 6, however as of the books publication (and this review writing), PHP 6.0 is not yet GA.
However, I'm using PHP Version 5.2.5 along with the book just fine.
The only suggestion I have regarding any improvement in this book would be the instructions the book provides regarding configuration and environment set up of Apache, MYSQL, and PHP.
The book uses screen shot examples (vs. detailed instructions on how to configure).
Example--Page 30= ="Installing Apache" (even if I used a magnifying glass, I don't think I could read those instructions).
With that said:
I would also highly recommend that anyone using PHP/MYSQL/Apache for the first time, consider using XAMPP--from Apache friends. Save yourself the configuration frustration/delays and use the preconfigured XAMPP package to get up and running in a matter of minutes.
(I wasted countless hours trying to configure my install until I discovered XAMPP on a discussion thread regarding installation problems for newbies).