php oop for dummies

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I know C, C++ and Java.  I have been using "procedural" PHP.  I get the list  
of classes for PHP, but I need a "PHP OOP for Dummies" on how to implement  
these.  Any pointers to a tutotial?


Re: php oop for dummies

Shelly wrote:

Quoted text here. Click to load it

Hi Shelly,

For starters:

It covers all basic usage.
If you are familiar with OOP, which you are since you did C++ and Java, PHP  
classes and OOP should be easy.
Remember that PHP is used mostly in webpages, and all objects should be  
created within a 'pagesession', and die when request is finished (unless  
you take certain precautions).
If you need them to live longer, you'll have to serialize them, store them  
somewhere (eg database or $_SESSION), and revive them where needed.
Things like J2EE's ServletContext doesn't exists in PHP, as all runs in a  
per-request fashion.

Hope that helps a bit.
I think you'll have an easy time coming C++ and Java. :-)

Good luck and regards,
Erwin Moller

Re: php oop for dummies

Thanks.  How silly of me not to think of RTFM.  I'll read that.

Site Timeline