note 20356 added to function.call-user-method
| From: | hewei at ied dot org dot cn | Date: | Mon, 01 Apr 2002 03:01:44 +0000 |
| Subject: | note 20356 added to function.call-user-method | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28442@lists.php.net to get a copy of this message | ||
bachi@insign.ch's failure of getting $a increased was beacuse call_user_method WAS expecting
its second parameter being passed by value rather than by reference. So every time call_user_method
("increase", $t) was called, a copy of $t was made with its $a property being the value of
that moment, in the above codes, 3. So one would get 1,2,3,4,4,4.
However, in the current version of PHP I'm using, 4.1.2. I do get 1,2,3,4,5,6. So probably the
defination of call_user_method has been changed.
--
http://www.php.net/manual/en/function.call-user-method.php
http://master.php.net/manage/user-notes.php?action=edit+20356
http://master.php.net/manage/user-notes.php?action=delete+20356
http://master.php.net/manage/user-notes.php?action=reject+20356