tags:

views:

125

answers:

3

I'm not new to OOP, but new to PHP. I know Java, Objective-C and some other object oriented languages. So I'm looking for a comprehensive overview of how OOP looks like in PHP.

+4  A: 

Always a starting point: http://php.net/manual/en/language.oop5.php

More of a walktrough: http://net.tutsplus.com/tutorials/php/oop-in-php/

The MYYN
A: 

Unfortunately it doesn't look too great in php (compared to C or Java), php OOP is still immature IMO, V6 should bring about a nice change though.

Alot of what you may regard as standard OOP functionality might be missing, full overloading, multiple inheritance, Objective types for Date, Int and String etc.

Some functions you will no doubt make use of are the "Magic" functions __call __get __set __callStatic __sleep __wake, these may help you get around some "missing" behaviour.

Question Mark
He's kind of correct here, OOP works in PHP but it's not efficient. Simply printing out get_memory_usage() will prove that within your OOP versus writing the code as non-OOP. Hopefully PHP6 is more efficient but I'm not very optimistic.
TravisO
Yeah i so want 6 to be the ruby killer it deserves to be. fingers crossed.
Question Mark
A: 

I find this one really good with real-world examples on oop.

Sarfraz
I believe that link should be http://www.phpro.org/tutorials/Object-Oriented-Programming-with-PHP.html
Jeff