ID: 28576 Comment by: jed at jed dot bz Reported By: zmeigorin at comail dot ru Status: Open Bug Type: Scripting Engine problem Operating System: Windows/Irrelevant? PHP Version: 4.3.6 New Comment:
Quoting from the manual: WARNING As this is an experimental extension, not all things work. There is no __call() support currently, you can only overload the get and set operations for properties. You cannot invoke the original overloading handlers of the class, and __set() only works to one level of property access. Recommend bogus. Previous Comments: ------------------------------------------------------------------------ [2004-05-30 13:18:24] zmeigorin at comail dot ru Description: ------------ http://bugs.php.net/bug.php?id=19859 seems to be the same, but for PHP5. When using call_user_func/call_user_func_array, undefined methods are not handled by __call. Reproduce code: --------------- <?php class MyOverload { function __call($method,$args,&$return) { return $return = "__call result\n"; } } overload('MyOverload'); $obj =& new MyOverload; echo $obj->test(); echo call_user_func(array($obj,'test')); ?> Expected result: ---------------- __call result __call result Actual result: -------------- __call result Warning: call_user_func(myoverload::test): First argument is expected to be a valid callback ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28576&edit=1