我很困惑如何使用&运营商减少记忆。=&运营商,记忆
我可以有以下问题的答案吗?
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