Author(s): Harry Fuecks
Publisher: SitePoint Pty. Ltd.
The PHP Anthology Object Oriented PHP Solutions Volume I book is mainly oriented to people that already have some knowledge of PHP.
If you want to quickly learn the basics for object-oriented PHP and save time by using object-oriented code repositories available online, then this is the book for you.
If you already are a PHP coder and want to convert from procedural to object-oriented programming but would like to learn to figure out your own code and write your own classes, you may want to get another book.
PROS
In chapter 2, PHP and MySQL, you learn by example these basic objected-oriented concepts: class syntax, objects, methods, constructors, scope, references, pointers, inheritance, overriding, aggregation and more.
In chapter 3, PHP and MySQL, I found the section How do I solve database errors caused by quotes/apostrophes? very useful. It discusses 3 possible solutions and their pros and cons.
Chapter 3 also explains SQL Injection Attacks, something all PHP/MySQL developers should know how to prevent.
From chapter 3 on, you will use packages available online loaded with PHP classes to assist you at writing your web applications.
CONS
The first paragraph of chapter 2 reads: “There is a growing number of object oriented code repositories, such as PEAR and PHP Classes, which can save you from hours of work spent solving well charted problems, and leave you free to focus on the specifics of your application”.
While this is very true, I bought this book with the intention of learning how to program object-oriented PHP. I didn’t want to borrow somebody else’s PHP classes. As you read deeper into the book, you realize the author relies more and more on PEAR packages.
Maybe this book should be renamed to something like “Object Oriented PHP Solutions using PEAR”.
I will read another PHP object-oriented book to learn how to write my own complex object-oriented code and then maybe go back to this book to learn how to apply some shortcuts in case I decide to use them.