Re: Only variables or references can be returned by reference
| From: | Moriyoshi Koizumi | Date: | Mon, 12 Jan 2004 07:34:30 +0000 |
| Subject: | Re: Only variables or references can be returned by reference | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-6987@lists.php.net to get a copy of this message | ||
> b) A function which returned a variable by reference couldn't be returned
> by reference. I think this one is probably OK to code.
Do you mean a referenced variable returned by a function couldn't be
returned as a reference by its caller? That is to say,
function &foo() {
return $a;
}
function &bar() {
return foo();
}
$a = &bar();
Moriyoshi