note 99545 added to language.references.pass
| From: | northhero at gmail dot com | Date: | Tue, 24 Aug 2010 01:47:11 +0000 |
| Subject: | note 99545 added to language.references.pass | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171957@lists.php.net to get a copy of this message | ||
In response to ben at mekhaye dot net, just changed the third parameter from $arr to &$arr, I
also got the result as expected.
$arr = Array();
call_user_func(Array("ClassName","functionName"), $param1, $param2,
&$arr);
print_r($arr);
class ClassName {
function functionName($param1, $param2, &$arr) {
$arr[0] = "apple";
$arr[1] = "banana";
print_r($arr);
}
}
Output was the expected:
Array ( [0] => "apple" [1] => "banana" )
Array ( [0] => "apple" [1] => "banana" )
----
Server IP: 61.195.146.164
Probable Submitter: 126.112.211.154
----
Manual Page -- http://www.php.net/manual/en/language.references.pass.php
Edit -- https://master.php.net/note/edit/99545
Del: integrated -- https://master.php.net/note/delete/99545/integrated
Del: useless -- https://master.php.net/note/delete/99545/useless
Del: bad code -- https://master.php.net/note/delete/99545/bad+code
Del: spam -- https://master.php.net/note/delete/99545/spam
Del: non-english -- https://master.php.net/note/delete/99545/non-english
Del: in docs -- https://master.php.net/note/delete/99545/in+docs
Del: other reasons-- https://master.php.net/note/delete/99545
Reject -- https://master.php.net/note/reject/99545
Search -- https://master.php.net/manage/user-notes.php