note 70757 deleted from function.call-user-func by cmb
| From: | cmb@php.net | Date: | Sun, 08 Dec 2019 11:14:47 +0000 |
| Subject: | note 70757 deleted from function.call-user-func by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213449@lists.php.net to get a copy of this message | ||
Note Submitter: bkfake-php at yahoo dot com
----
I have found a case where the parameters ARE passed by reference
class test
{
function test()
{
$this->passme = '';
call_user_func('outsidefunc',$this);
// $this->passme is now 'not empty'
// with 5.1.2
// not so with php 4.3.10...
}
}
function outsidefunc(&$testy)
{
$testy->passme = 'not empty';
}
$test = new test();
echo 'passme = '.$test->passme;