Earnie Boyd wrote:
Quoting andy baxter andy@earthsong.free-online.co.uk:
I have seen it suggested just to remove the & in cases where the function is expecting an object. Does this make sense in PHP terms?
Unless the function is defined incorrectly and doesn't use the purpose of pass by reference then it is absolutely incorrect to remove the & from the parameter. A pass by reference parameter allows changes to the external data. If you remove & then the changes become local to the function and the resultant change is not seen externally.
OK. thanks.