From: six at aegis-corp dot org Operating system: Linux 2.6 PHP version: 5.3.0alpha3 PHP Bug Type: Scripting Engine problem Bug description: callbacks are not looked up in the current namespace
Description: ------------ functions that accept callbacks do not look up the current namespace when searching for the callback name. I have observed this with register_shutdown_function() and pcntl_signal() but it's probably more than these two. sample code below works if we pass the fqn, ie: register_shutdown_function("test\\shutdown"); Reproduce code: --------------- <? namespace test; function shutdown() { echo "bye\n"; } register_shutdown_function("shutdown"); ?> Expected result: ---------------- bye Actual result: -------------- Warning: register_shutdown_function(): Invalid shutdown callback 'shutdown' passed in /root/php-5.3.0alpha3/ext/pcntl/- on line 11 -- Edit bug report at http://bugs.php.net/?id=47014&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47014&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47014&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47014&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47014&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47014&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47014&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47014&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47014&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47014&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47014&r=support Expected behavior: http://bugs.php.net/fix.php?id=47014&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47014&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47014&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47014&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47014&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47014&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47014&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47014&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47014&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47014&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47014&r=mysqlcfg