Referencing a "constant" class variable

From: Date: Wed, 06 Oct 2004 16:08:22 +0000
Subject: Referencing a "constant" class variable
Groups: php.general 
Request: Send a blank email to php-general+get-198758@lists.php.net to get a copy of this message
If I have a class that looks like this: class MyClass { var $MyClassVar = "Bob"; } is there a way to reference that variable w/o instantiating MyClass? I've tried: MyClass::$MyClassVar MyClass->$MyClassVar MyClass.$MyClassVar nothing works. Is this even possible? I'm using PHP 4.3.2. thnx, Chris

« previous php.general (#198758) next »