|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-01-30 12:26 UTC] felipe@php.net
[2008-01-30 12:31 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 20:00:01 2025 UTC |
Description: ------------ NB: This issue is specific to PHP6 snaps. PHP5.2 and PHP5.3 snaps produce the expected output. When using a callback of the form 'C::f' where class C is not yet defined, __autoload() is invoked with the fully qualified method name as an argument, rather than just the class name. Reproduce code: --------------- <?php function __autoload($name) { echo "Autoload class: $name\n"; if ($name == 'C') { class C { static function f() { echo "In C::f()\n"; } } } } call_user_func('C::f'); ?> Expected result: ---------------- Autoload class: C In C::f() Actual result: -------------- Autoload class: C::f Warning: call_user_func() expects parameter 1 to be valid callback, string given in %s on line 9