Deltran Posted January 23, 2007 Share Posted January 23, 2007 I've been having a hard time trying to find an answer to this:What is the difference between [b]function myFunc()[/b] and [b]function &myFunc() [/b]??? Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 23, 2007 Share Posted January 23, 2007 I've never seen that on functions. I know you can pass a variable by reference. Normally variables are passed by value, meaning a copy is made, whereas reference points to the actual variable.Edit: http://www.php.net/manual/en/language.references.return.php"Returning by-reference is useful when you want to use a function to find which variable a reference should be bound to." Quote Link to comment Share on other sites More sharing options...
Deltran Posted January 23, 2007 Author Share Posted January 23, 2007 [quote author=jesirose link=topic=123717.msg511743#msg511743 date=1169585730]I've never seen that on functions. I know you can pass a variable by reference. Normally variables are passed by value, meaning a copy is made, whereas reference points to the actual variable.Edit: http://www.php.net/manual/en/language.references.return.php"Returning by-reference is useful when you want to use a function to find which variable a reference should be bound to."[/quote]Ah, there it is! Thank you so much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.