|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6347 Methods called by call_user_method() misbehave
Submitted: 2000-08-25 06:06 UTC Modified: 2000-08-25 06:09 UTC
From: bachi at insign dot ch Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0.1pl2 OS: Linux
Private report: No CVE-ID: None
 [2000-08-25 06:06 UTC] bachi at insign dot ch
If you call a object method with call_user_method(), it can't handle its own object properties anymore. The demo below returns 1,2,3 for the direct calls as expected, but then just 4,4,4 for the indirect calls.    

class test
        var $a=0;

        function increase()
            echo "a is now: ".$this->a."\n<br>";


    $t = new test();

    echo "Direct calls:\n<br>";

    echo "<p>\n\nIndirect calls:\n<br>";

    call_user_method ("increase", $t);
    call_user_method ("increase", $t);
    call_user_method ("increase", $t);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-25 06:09 UTC]
Please try 4.0.2RC1 available at
I should have fixed this and I think the fix made it into RC1. If this still is a problem please open a new bug report.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 02 20:03:58 2022 UTC