| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2001-02-17 03:01 UTC] cazzell at eng dot usf dot edu
  [2001-10-21 19:11 UTC] sniper@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 11:00:01 2025 UTC | 
First some sample code: class foo { var $bar = 0; function increase () { $this->bar++; } } $foo = new foo; print "Bar: " . $foo->bar . "\n"; call_user_method('increase', $foo); print "Bar: " . $foo->bar . "\n"; $foo->increase(); print "Bar: " . $foo->bar . "\n"; This will output: Bar: 0 Bar: 0 Bar: 1 It appears that call_user_method is working on a copy of the object rather than the object itself.