/* 传值和传引用的区别 */ function test1($m){ $m=$m+1; echo $m; } $m=5; test1($m);//输出6 echo $m;//输出5 echo "<hr>"; function test2(&$n){ $n=$n+1; echo $n; } $n=5; test2($n);//输出6 echo $n;//输出6 echo "<hr>";