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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rain_c1@web.de

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

    hi!

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

    this does not work:
    $classname::$me mber

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

    for constants, too:
    constant($class name.'::CONSTAN T');

    is there any similar way for members?

    thanks,
    - rainer

Working...