Bug #18016: function_exists, call_user_func_* and methods

From: Date: Thu, 27 Jun 2002 12:08:05 +0000
Subject: Bug #18016: function_exists, call_user_func_* and methods
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12235@lists.php.net to get a copy of this message
From: akul@otamedia.com Operating system: all PHP version: 4.2.1 PHP Bug Type: Scripting Engine problem Bug description: function_exists, call_user_func_* and methods <? class test { function staticFunction($a) { echo "\ntest::staticFunction($a)"; } } echo "\nTest page\n"; echo 'function_exists=['.function_exists("test::staticFunction").']'; test::staticFunction(999); call_user_func_array("test::staticFunction",array(999)); ?> Result: Test page function_exists=[] test::staticFunction(999) Warning: call_user_func_array() expects first argument, 'test::staticFunction', to be a valid callback in bug.php on line 17 Must be: Test page function_exists=[TRUE] test::staticFunction(999) test::staticFunction(999) (Please, don't write me stupid comments about method_exists()! Just read one more time function name.) -- Edit bug report at http://bugs.php.net/?id=18016&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18016&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18016&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18016&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18016&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18016&r=support Expected behavior: http://bugs.php.net/fix.php?id=18016&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18016&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18016&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18016&r=globals

« previous php.bugs (#12235) next »