note 9095 added to Returning References
| From: | nospam at steem dot com | Date: | Mon, 16 Oct 2000 17:59:40 +0000 |
| Subject: | note 9095 added to Returning References | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6524@lists.php.net to get a copy of this message | ||
What I think this is doing is making $foo a reference to the returned data. Instead of having $foo
being a copy of the returned data. So this is a lot more efficient, especially if return'ed
data is large. I could be offbase here though, as I have been wrong at least once before.
It would be cool if it was possible to make this the default behavior for functions, I don't
see what would change by making this so. Except more efficient code, obviously. Although
there's probably a good reason I'm missing why it isn't the default. Maybe this is
why I don't design languages? :)
http://www.php.net/manual/language.references.return.php