On Sun, 2008-09-21 at 12:24 +0100, Ben Stones wrote:
> Hi,
> 
> Just started with object oriented programming and glad I have come across
> it, just need a few things clearing up.
> 
> When I make a variable or method public, does this mean that it can be used
> outside of classes, for instance in other classes or as well as
> instantiating classes? So if I made it private, it wouldn't be able to be
> instantiated or extended in other classes, am I right?
> 
> I have never added public when I am creating methods so I presume its
> already set as default if you don't add it?
> 
> Hope you can understand my question.
> 
> Cheers.
As far as I understand it, public methods of a class let you use it on
instances of that class, but private methods can only be called from
within the class itself, if that makes any sense?


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to