Passing values by reference.
| From: | James Corbett | Date: | Sat, 08 Jul 2000 11:18:32 +0000 |
| Subject: | Passing values by reference. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-5526@lists.php.net to get a copy of this message | ||
Hi,
Sorry in advance if this gets confusing.
If I pass a variable by reference to a function and then from that function
pass it again by reference to another function, am I passing the address of
the reference or will it be the address of the variable?
example below:
<?
function second( &$refRefVar ) {
# is this the address of the reference to someVar?
# Or
# Is it the address of someVar?
echo $refVar;
}
function first( &$refVar ) {
second( $refVar );
}
$someVar = "someVal";
first( $someVar );
?>
Cheers,
James