note 20027 deleted from language.variables by spic

From: Date: Sun, 13 Oct 2002 15:48:46 +0000
Subject: note 20027 deleted from language.variables by spic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-38016@lists.php.net to get a copy of this message
In the example listed above: <?php $foo = 'Bob'; // Assign the value 'Bob' to $foo $bar = &$foo; // Reference $foo via $bar. $bar = "My name is $bar"; // Alter $bar... echo $foo; // $foo is altered too. echo $bar; ?> the documentation above it is somewhat ambiguous: $bar = &$foo means that $foo becomes the reference for $bar, thus $foo = "Bob". As I read it, $bar should've become the reference for $foo, took me a bit to turn it around. Just some clarification.

« previous php.notes (#38016) next »