note 27120 added to function.call-user-func
| From: | matt at tasonline dot com | Date: | Sat, 23 Nov 2002 18:24:45 +0000 |
| Subject: | note 27120 added to function.call-user-func | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39897@lists.php.net to get a copy of this message | ||
On PHP 4.2.3 (not sure about older releases) you can send objects by reference by sending the
reference from call_user_func()
function myFunction(@$obj)
{
$obj->doThis('hello');
return 0;
}
$myObj = new CObject();
call_user_func('myFunction', @$myObj);
--
http://www.php.net/manual/en/function.call-user-func.php
http://master.php.net/manage/user-notes.php?action=edit+27120
http://master.php.net/manage/user-notes.php?action=delete+27120
http://master.php.net/manage/user-notes.php?action=reject+27120