terryds Posted October 27, 2013 Share Posted October 27, 2013 What's the difference between function &return_fish() { $fish = "Fish"; return $fish; } $fish_ref =&return_fish(); And function return_fish() { $fish = "Fish"; return $fish; } $fish_ref = return_fish(); I see that the first one is returning by reference... But, i don't understand what 'returning by refence' means... I'm sorry i'm not so good at English Can you give me an example to show that they are different ? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 28, 2013 Share Posted October 28, 2013 That example isn't very useful. In fact, returning a reference isn't used very often. Normally you pass by reference instead. Where did you see that example? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now