note 52835 deleted from language.references.whatdo by tularis

From: Date: Sat, 14 May 2005 16:33:02 +0000
Subject: note 52835 deleted from language.references.whatdo by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-89427@lists.php.net to get a copy of this message
Note Submitter: somebody at somwhere dot com Reason: useless ---- More References Fun! <?php $a = 'This is a string'; $b = &$a; $c = &$b; $d = $b; echo 'c = '. $c .'<br />'; echo 'd = '. $d .'<br />'; $a = 'Changed a String'; echo '<br />'; echo 'c = '. $c .'<br />'; echo 'd = '. $d .'<br />'; unset($b); $b = 'Some other string'; $a = 'Changed a String Again'; echo '<br />'; echo 'c = '. $c .'<br />'; echo 'd = '. $d .'<br />'; ?> The output being: c = This is a string d = This is a string c = Changed a String d = This is a string c = Changed a String Again d = This is a string This basically means that references to references (why you would use this though is beyond me), doesn't make a reference of the reference variables reference (etc... if you know what I mean), but is basically a copy of the reference to the 'real' variable.

« previous php.notes (#89427) next »