Re: =& problem with ZE2: Can't use function return value in write context
| From: | John Lim | Date: | Tue, 11 Jun 2002 18:27:03 +0000 |
| Subject: | Re: =& problem with ZE2: Can't use function return value in write context | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-85144@lists.php.net to get a copy of this message | ||
Thanks! I appreciate the fast response. I look forward to testing future
versions of ZE2.
"Andi Gutmans" <andi@zend.com> wrote in message
news:5.1.0.14.2.20020611200706.03ba0ac0@127.0.0.1...
> This should be fixed now.
> Note, that it will only work if you are returning your return value by
> reference. In engine 1 doing anything else was buggy.
>
> Andi
>
> At 07:16 PM 6/11/2002 +0300, Andi Gutmans wrote:
> >It's supposed to work under the same circumstances as in Engine 1 (if you
> >really returned a reference) although in most cases you will now be
> >returning objects by value and assigning them by value. It was introduced
> >originally to get around the object problems the Engine 2 solved.
> >I'll look into it.
> >
> >Andi
> >
> >At 06:12 PM 6/11/2002 +0800, John Lim wrote:
> >>Hello,
> >>
> >>With the ZE 2, PHP 4.3.0-alpha
> >>
> >><?php
> >> :
> >> : # some init code
> >> :
> >>$aclass =& afunction($params);
> >>?>
> >>
> >>I get an error that looks like this:
> >>
> >>Fatal error: Can't use function return value in write context in
> >>d:\inetpub\wwwroot\php\test5.php on line 29
> >>
> >>Is this a bug or a feature of the new ZE2. I noticed there are many
places
> >>in PEAR and my code that use the =& syntax.
> >>
> >>Thanks again, John
> >>
> >>
> >>
> >>--
> >>PHP Development Mailing List
> >><http://www.php.net/>
> >>To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >--
> >PHP Development Mailing List <http://www.php.net/>
> >To unsubscribe, visit: http://www.php.net/unsub.php
>