ID: 45186 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Assigned +Status: Closed Bug Type: Scripting Engine problem PHP Version: 5.3CVS-2008-06-05 (CVS) Assigned To: felipe New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2008-06-05 12:26:12] [EMAIL PROTECTED] Description: ------------ The magic method __call depends on __callstatic to be called in *class scope*. Adding: static public function __callstatic($a, $b) { print "__callstatic:\n"; var_dump($a); } The __call is called. Therefore, why dependency on __callstatic? Reproduce code: --------------- <?php class bar { public function __call($a, $b) { print "__call:\n"; var_dump($this); } public function test() { self::ABC(); bar::ABC(); call_user_func(array('bar', 'abC')); } } $x = new bar; $x->test(); Expected result: ---------------- __call: object(bar)#1 (0) { } __call: object(bar)#1 (0) { } __call: object(bar)#1 (0) { } Actual result: -------------- __call: object(bar)#1 (0) { } __call: object(bar)#1 (0) { } Warning: call_user_func() expects parameter 1 to be a valid callback, class 'bar' does not have a method 'abc' in ... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45186&edit=1