|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-06-05 18:52 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 18:00:01 2025 UTC |
Description: ------------ See the code below. Reproduce code: --------------- <?php class foo { public function test() { call_user_func(array('FOO', 'ABC')); call_user_func(array($this, 'ABC')); call_user_func('FOO::ABC'); } function __call($a, $b) { print "__call:\n"; var_dump($a); } static public function __callStatic($a, $b) { print "__callstatic:\n"; var_dump($a); } } $x = new foo; $x->test(); Expected result: ---------------- __call: string(3) "ABC" __call: string(3) "ABC" __call: string(3) "ABC" Actual result: -------------- __call: string(3) "ABC" __call: string(3) "ABC" Fatal error: Non-static method foo::ABC() cannot be called statically in ...