日期:2014-05-17 浏览次数:20572 次
$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. ?>