View Single Post

  #3 (permalink)  
Old 11-27-2006
jopperdepopper
 
Posts: n/a
Default Re: php 5 classes: public, protected and private


>
> You should read "can be accessed everywhere".
>
> Private members can be accessed by members of the class only.
> Protected members can be accessed by members of the class or a derived
> class.
> Public members can be accessed by anyone, including other classes,
> functions and any other code.



Thanks Jerry. I'm trying to make a bit of sense of the php 5 approach
to classes, and so far having a hard time. I fail to see the 'why'
behind the 'public, protected and private' and stuff like abstraction,
interfaces and whatnot. Feels like things are being over-complicated
somehow... or it's just my being inexperienced on this...

Any other reading material on this suggested, someone?

Reply With Quote