Re: private $foo

From: Date: Wed, 29 Mar 2006 07:28:31 +0000
Subject: Re: private $foo
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-232796@lists.php.net to get a copy of this message
Anthony Ettinger wrote:
private $foo; cannot be accessed directly outside the script. print $f->foo; #fails Fatal error: Cannot access private property Foo::$foo in /x/home/username/docs/misc/php/client.php on line 11
Did you define the __get and __set functions in your class as in the previous post? Are you running a version of PHP that supports them? Jasper

« previous php.general (#232796) next »