On Fri, 10 Sep 2004 15:09:57 -0700, Ed Lazor <[EMAIL PROTECTED]> wrote:
Any recommendations on the best PHP5 OOP book to get? I have Advanced PHP Programming by George Schlossnagle. It's turning out to be a great book, but I'd like to read more on PHP5 OOP. The first chapter recommends two books, but both deal with OOP from the perspective of C++, C#, and Perl.
Do not bother to get "PHP5 and MySQL Bible" unless you're a complete PHP beginner. The one OO chapter is not much more than is in the PHP manual. I got it and wish I hadn't. Overall it's long-winded and the humor is dry. Tons of useless chatter in between the information you really want.
Honestly, if you want to learn OOP in php5, the best way to do it is to get an IDE that contains a PHP 5 step-through debugger such as Zend IDE and try out the stuff you see in the link from the php.net home page regarding Zend Engine 2. It is very similar to java/c# and perl in terms of the similarity to those features (exceptions, try/catch, PPP are all from those languages). The big changes are the new xml extensions and their derivatives like simplexml, dom, soap. Learning the DOM extension and simplexml is very difficult to do without some kind of prior knowledge of DOM, but you'll learn more from sites like w3cschools.com than you will from a book. In addition, ReflectionClass is your friend, as in:
<?php $a = new ReflectionClass('DOMDOcument'); var_dump($a->getMethods()); // or even $a = new ReflectionClass('ReflectionClass'); var_dump($a->getMethods()); ?>
I would recommend starting with the big red "Beginning PHP4" and then simply using trial and error to learn the differences with PHP5, it's not all that different from php4 in the basics, it is a question of how you use it.
Greg
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php