Re: ZE2: accessing a class static variable

From: Date: Fri, 20 Dec 2002 18:02:30 +0000
Subject: Re: ZE2: accessing a class static variable
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-92719@lists.php.net to get a copy of this message
Hi, while it's good to read that Andi is thinking of something, this issue has been brought up recently. If you need a workaround now, you can use eval() to accomplish this. - Markus On Fri, Dec 20, 2002 at 04:49:00PM +0100, Mickael Bailly wrote : > > Hello, > > One line to say this is my first post here, I thought about posting in > php-general, but ZE2 is in development, so... > > I want to access a static variable of a class, but I CANNOT use directly the > class name, so class name is in a variable. > > To be clear: > > <?PHP > > class foo { > static $conf = 'configuration variable'; > } > > $var = 'foo'; > > echo $var::$conf ; > > ?> > > this produces a parsing error... > > How could I do ? > > Thanks > > -- > Mickael Bailly > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.dev (#92719) next »