#31318 [Opn->Fbk]: Static method invocation with classname in a variable

From: Date: Mon, 02 May 2005 09:59:42 +0000
Subject: #31318 [Opn->Fbk]: Static method invocation with classname in a variable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-78513@lists.php.net to get a copy of this message
ID: 31318 Updated by: andrey@php.net Reported By: sebastian@php.net -Status: Open +Status: Feedback Bug Type: Feature/Change Request Operating System: Irrelevant PHP Version: 5CVS-2004-12-28 (dev) New Comment: ReflectionAPI? Previous Comments: ------------------------------------------------------------------------ [2004-12-28 10:35:24] sebastian@php.net Description: ------------ Static members of a class should be accessible even if the classname is stored in a variable. Reproduce code: --------------- <?php class Foo { public static function bar() { print 'Foo::bar()'; } } $class = 'Foo'; $class::bar(); ?> Expected result: ---------------- Foo::bar() Actual result: -------------- Parse error: parse error in D:\foo.php on line 9 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31318&edit=1

« previous php.bugs (#78513) next »