关联参数(&的用法)

<?php
header("Content-Type:text/html;charset=gb2312");
function test1(&$a){
    $a.="和小明";
}
$b="这是小王";
test1($b);
echo $b;//这是小王和小明
echo "<hr>";
function test2($a){
    $a.="和小明";
}
$c="这是小王";
test2($c);
echo $c;//这是小王
?>
原文地址:https://www.cnblogs.com/h-g-f-s123/p/5828771.html