Re: php5 method return reference error?
| From: | Derick Rethans | Date: | Thu, 13 Nov 2003 19:11:07 +0000 |
| Subject: | Re: php5 method return reference error? | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-5447@lists.php.net to get a copy of this message | ||
On Thu, 13 Nov 2003, Michael Walter wrote:
> Not sure I'm missing something, but I fail to see the problem: Doesn't
> PHP 5 use object references anyway? So function pla() { return new
> Foo(); } would return a reference anyway, instead of copying the object
> itself over?
No, it's not a reference, but an object handle which still can be passed
as reference (but it's quite unuseful to do).
> So just removing & should fix the problem, as long as you're dealing
> with objects.
Yup.
Derick