#26953 [Opn->Bgs]: static function in unnamed class not callable

From: Date: Mon, 02 May 2005 09:33:41 +0000
Subject: #26953 [Opn->Bgs]: static function in unnamed class not callable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-78508@lists.php.net to get a copy of this message
ID: 26953 Updated by: andrey@php.net Reported By: alex at netflex dot nl -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: all PHP Version: 5.0.0b3 (beta3) New Comment: Use reflection API http://php.net/manual/en/language.oop5.reflection.php look at ReflectionClass::getMethod(string method_name) and then ReflectionMethod::invoke() Previous Comments: ------------------------------------------------------------------------ [2004-01-18 08:20:26] alex at netflex dot nl changed the summary ------------------------------------------------------------------------ [2004-01-18 08:18:40] alex at netflex dot nl Description: ------------ It isn't posible to make a call to a static function in a class if you dont no the name of the class while you making the script: class gfx_tagHandler_img { public static function isSupported() { return true;} } $test = "gfx_tagHandler_img"; echo {$test}::isSupported(); I was expecting that: echo {$test}::isSupported(); was translated to: echo gfx_tagHandler_img::isSupported(); but is wasn't can this be an feature for PHP? tnx. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26953&edit=1

« previous php.bugs (#78508) next »