NYCPHP Meetup

NYPHP.org

[nycphp-talk] static variable variable?

John Campbell jcampbell1 at gmail.com
Thu Dec 20 00:40:25 EST 2007


Humm...

The only thing I can think of is to do something like:
$v = get_class_vars(get_class($this));
print_r($v['_staticvar']);

Kind of a shitty hack, and it reminds me of one thing that pisses me
off about php.
Why can't we do:
print_r(get_class_vars(get_class($this))['_staticvar']);


Regards,
John Campbell



More information about the talk mailing list