//function test(&$var)用法 传入值随方法改变 //将传入的值也改变了 function test(&$var) { return ++$var; } $v=2; echo test($v); echo $v+=2;//5 echo test($v);//6