note 17072 added to function.call-user-func
| From: | alex at php2 dot chek dot com | Date: | Sat, 24 Nov 2001 17:07:40 +0000 |
| Subject: | note 17072 added to function.call-user-func | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-21240@lists.php.net to get a copy of this message | ||
note the following with regard to references:
function foo(&$ref)
{
}
$fish=new FishObject();
call_user_func("foo",$fish);
This does not work in PHP 4.0.6. It seems the following is necessary to actualy pass a reference:
call_user_func("foo",&$fish);
(Slight disclaimer, I was doing this on an object var, but I'm guessing it makes no difference
on what you call call_user_func.)
--
http://www.php.net/manual/en/function.call-user-func.php
http://master.php.net/manage/user-notes.php?action=edit+17072
http://master.php.net/manage/user-notes.php?action=delete+17072
http://master.php.net/manage/user-notes.php?action=reject+17072