accessing static member if class name is a variable (crosspost php.general)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


is there a way to access a static member of a class, if the classname
is a variable?

this does not work:

for methods there is a solution:
call_user_func(array($classname, 'method'));

for constants, too:

is there any similar way for members?

- rainer

Site Timeline