static class call..
| From: | jsWalter | Date: | Sat, 27 Sep 2003 03:48:33 +0000 |
| Subject: | static class call.. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-164078@lists.php.net to get a copy of this message | ||
Is there a way that a method within a Class, when called statically, can
access a property of that Class?
Class Foo
{
var $_TintBaz = 9;
function getBaz()
{
return Foo::_TintBaz; // <-- line 8
}
}
echo Foo::getBaz();
This returns...
Parse error: parse error, unexpected ';', expecting '('
in test 02.php on line 8
And of course, can't use 'return Foo::_TintBaz;' in a statically called
Class.
Is there any hope?
Thanks
Walter