note 20027 added to language.variables

From: Date: Tue, 19 Mar 2002 20:31:29 +0000
Subject: note 20027 added to language.variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-27970@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. -- http://www.php.net/manual/en/language.variables.php http://master.php.net/manage/user-notes.php?action=edit+20027 http://master.php.net/manage/user-notes.php?action=delete+20027 http://master.php.net/manage/user-notes.php?action=reject+20027

« previous php.notes (#27970) next »