#24378 [Opn->Bgs]: Calling static methods without knowing the name of the class

From: Date: Sat, 28 Jun 2003 22:51:29 +0000
Subject: #24378 [Opn->Bgs]: Calling static methods without knowing the name of the class
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-42697@lists.php.net to get a copy of this message
ID: 24378 Updated by: derick@php.net Reported By: ville dot tapio at fountainpark dot com -Status: Open +Status: Bogus Bug Type: Class/Object related PHP Version: 4.3.1 New Comment: Not a bug, this just isn't supported. Previous Comments: ------------------------------------------------------------------------ [2003-06-28 17:39:32] ville dot tapio at fountainpark dot com Category fixed. ------------------------------------------------------------------------ [2003-06-28 17:37:41] ville dot tapio at fountainpark dot com Ugly workaround: Class Foo { function bar() {} } $class = 'Foo'; eval ($class . '::bar();'); ------------------------------------------------------------------------ [2003-06-28 17:09:32] ville dot tapio at fountainpark dot com Description: ------------ Class Foo { function bar() {} } $class = 'Foo'; $class::bar(); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24378&edit=1

« previous php.bugs (#42697) next »