#22866 [Fbk->NoF]: Variable function call on object method fails

From: Date: Mon, 21 Apr 2003 14:18:09 +0000
Subject: #22866 [Fbk->NoF]: Variable function call on object method fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37945@lists.php.net to get a copy of this message
ID: 22866 Updated by: sniper@php.net Reported By: tys at cs dot ualberta dot ca -Status: Feedback +Status: No Feedback Bug Type: Class/Object related Operating System: Linux PHP Version: 4.3.1 New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2003-04-09 16:47:55] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-03-25 00:36:06] tys at cs dot ualberta dot ca 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 this bug report at http://bugs.php.net/?id=22866&edit=1

« previous php.bugs (#37945) next »