note 83761 deleted from language.references.pass by mgf
| From: | mgf@php.net | Date: | Thu, 19 Jun 2008 14:15:41 +0000 |
| Subject: | note 83761 deleted from language.references.pass by mgf | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-140585@lists.php.net to get a copy of this message | ||
Note Submitter: eduard dot ereza at blueit dot es
Reason: 1
----
For your information, the variables passed by reference must go first in the call. For example, this
does not work:
<?php
function foo($a,$b,$c,$d,$e,$f,$g,$h,&$i){
$i='some_string';
return 0;
}
$z=foo($i);
echo $i; //prints nothing;
?>
However:
<?php
function foo(&$i,$a,$b,$c,$d,$e,$f,$g,$h){
$i='some_string';
return 0;
}
$z=foo($i);
echo $i; //prints 'some_string';
?>