Re: RE:Class::? - accessing data, no success...

From: Date: Tue, 04 Jul 2000 11:11:20 +0000
Subject: Re: RE:Class::? - accessing data, no success...
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-23438@lists.php.net to get a copy of this message
UW>> Please do not implement $class::var = $x. This would cause UW>> confusion and it would not make any sense. Use objects to do such UW>> things. How about f($class::var)? UW>> <?php UW>> class foo { UW>> var $bar = "this one is good"; UW>> UW>> function foo() { UW>> print "silly example"; UW>> } UW>> } UW>> UW>> print foo::bar; // static (read-only!) access of a property UW>> foo::foo(); // static access of a method UW>> ?> $foo_bar = "this one is good"; class foo { function foo() { print "silly example"; } } print $foo_bar; etc, etc. UW>> $this->bar = 8; // dirty, because there's no foo UW>> print $this->bar; // object but a default class Yeah. You don't call this unless you know what you are doing. -- Stanislav Malyshev stas@zend.com +972-3-6139665

« previous php.dev (#23438) next »