PHP reference Call 1. functiontest ($ arr) {}& nbsp; & nbsp; echotest (& amp; $ arr); 2. functiontest (& amp; $ arr) {}& nbsp; & nbsp; echotest ($ arr); & nbsp; 1 and 2 are the same effect. 3. function & amp; test ($ arr) {call referenced by retur PHP
1. function test ($ arr ){}
Echo test (& $ arr );
2. function test (& $ arr ){}
Echo test ($ arr );
1 and 2 are the same results.
3. function & test ($ arr) {return $ result ;}
Echo & test ($ a); valid
Echo test ($ a); the returned value is not a reference
Conclusion: The reference is returned only when the method name is added before the method name and the method name is added before the method name.
4. $ a = $ B;
When $ a and $ B are not assigned a value again, that is, when no write operation is performed, it is the same as $ a = & $ B, that is, it is equivalent to assigning a reference.
A copy value is assigned to $ a only when $ a or $ B changes.