|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-11-10 10:32 UTC] johannes@php.net
[2007-11-14 08:03 UTC] jani@php.net
[2007-11-25 20:08 UTC] chagenbu@php.net
[2008-01-17 06:11 UTC] chagenbu@php.net
[2008-01-30 19:20 UTC] helly@php.net
[2008-01-30 19:25 UTC] chagenbu@php.net
[2008-01-31 15:30 UTC] jason at citydiesel dot net
[2008-01-31 16:48 UTC] mike at theupstairsroom dot com
[2008-02-01 08:58 UTC] jochem at mondrian dot nl
[2008-02-01 22:56 UTC] jani@php.net
[2008-02-01 23:22 UTC] rasmus@php.net
[2008-02-03 04:27 UTC] chagenbu@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 01:00:01 2025 UTC |
Description: ------------ The callback syntax of array('classname', 'methodname') for making static method calls is now enforcing E_STRICT even if E_STRICT is not on. So methods that are not explicitly declared static can't be used this way even with E_STRICT off. Putting static in front of the function makes it work, but of course results in a parse error when the code is run under PHP 4. Reproduce code: --------------- <?php class Test { function hello() { echo "hello\n"; } } call_user_func(array('Test', 'hello')); Expected result: ---------------- hello Actual result: -------------- Warning: call_user_func() expects parameter 1 to be valid callback, array given in /Users/chuck/callback.php on line 11