参见英文答案 > What does it mean to start a PHP function with an ampersand? 3个
> Reference — What does this symbol mean in PHP? 18个
function fun1();
function &fun1();
这些有什么区别?
解决方法:
Returning by reference is useful when you want to use a function to
find to which variable a reference should be bound. Do not use
return-by-reference to increase performance. The engine will
automatically optimize this on its own. Only return references when
you have a valid technical reason to do so.