Re: Public in Classes

From: Date: Sun, 21 Sep 2008 11:38:55 +0000
Subject: Re: Public in Classes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-280621@lists.php.net to get a copy of this message
Here you go. http://talks.php.net/show/php5_ca/4 Ólafur Waage olafurw@gmail.com 2008/9/21 Ben Stones <stonesben@googlemail.com>: > 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. >

« previous php.general (#280621) next »