I am Studying PHP, and i wanted to ask about references,
My question: What is the difference when you define function with (&) and when you call function with (&) same is for parameters, In other words what the difference when i put (&) at the definition between when i call the function/parameter with (&), thank you all and have a nice day.
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. To return references, use this syntax:
From the PHP manual Returning References
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With