我很困惑如何使用&運營商減少記憶。=&運營商,記憶
我可以有以下問題的答案嗎?
clase C{
function B(&$a){
$this->a = &$a;
$this->a = $a;
//They are the same here created new variable $this->a??
// Or only $this->a = $a will create new variable?
}
}
$a = 1;
C = new C;
C->B($a)
或者,也許我的理解是完全錯誤的.....
http://php.net/manual/en/language醜陋的副作用。 references.pass.php – user1909426
猜你根本不需要'&'。 – KingCrunch