|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28576 __call not invoked by call_user_func
Submitted: 2004-05-30 13:18 UTC Modified: 2004-07-11 21:40 UTC
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: zmeigorin at comail dot ru Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 4.3.6 OS: Windows/Irrelevant?
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: zmeigorin at comail dot ru
New email:
PHP Version: OS:


 [2004-05-30 13:18 UTC] zmeigorin at comail dot ru
------------ 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:
    class MyOverload {
        function __call($method,$args,&$return) {
            return $return = "__call result\n";
    $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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-30 22:40 UTC] jed at jed dot bz
Quoting from the manual:

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.
 [2004-07-11 21:40 UTC]
See above.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Jun 09 11:03:41 2023 UTC