Re: private $foo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux