From: tys at cs dot ualberta dot ca Operating system: Linux PHP version: 4.3.1 PHP Bug Type: Class/Object related Bug description: Variable function call on object method fails
A variable function can be called on a normal function just fine: ------------------------------ function test() { return "test1"; } $function = "test"; echo $function(); ------------------------------ This outputs: test However trying the same thing on a funciton inside a class will fail: ------------------------------ class Test { function Test() { } function testClass() { return "test 2"; } } $function = "Test::testClass"; echo $function(); ------------------------------ Calling: echo Test::testClass(); works fine, however the above code does not. It should output: test 2 However it returns an error similar to the following: Fatal error: Call to undefined function: registration::formatdate() in /home/gaza/public_html/fp_php/support/table.php on line 396 -- Edit bug report at http://bugs.php.net/?id=22866&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22866&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22866&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22866&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22866&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22866&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22866&r=support Expected behavior: http://bugs.php.net/fix.php?id=22866&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22866&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22866&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22866&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22866&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22866&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22866&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22866&r=gnused