php5 の値の割り当てと参照の割り当て
値の割り当て - 2 つの変数は独自のメモリを持ち、相互に影響しません
$str1 = "wang"; $str2 = $str1; $str1 = "zhang"; echo $str2; // wang
$i = "zhao"; $j = "wang"; $j = &$i; echo $j; // zhao $j = "hello,$j"; echo $j; //hello,zhao echo "<br/>"; echo $i; //hello,zhao
<?php $foo = 25; $bar = &$foo; // This is a valid assignment. $bar = &(24 * 7); // Invalid; references an unnamed expression. function test() { return 25; } $bar = &test(); // Invalid. ?>