|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-01-06 11:00 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 15:00:01 2025 UTC |
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