Re: ref fix revisited
| From: | Derick Rethans | Date: | Wed, 14 Sep 2005 13:10:32 +0000 |
| Subject: | Re: ref fix revisited | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-18888@lists.php.net to get a copy of this message | ||
On Wed, 14 Sep 2005, Andreas Ahlenstorf wrote:
>
> Am 14.09.2005 um 14:36 schrieb Derick Rethans:
>
> > > Since we can detect a ref to a temp var at call time now, how about
> > > making a local copy in the function and effectively treat it as a
> > > by-value arg and also issue an E_NOTICE or an E_STRICT? I think that
> > > would solve the corruption problem without breaking BC.
> > >
> >
> > That's exactly what we do in 4.4.
>
> array_pop(explode('.', $name))); raises Fatal Error in PHP 4.4.0 on FreeBSD =>
> App broken.
Of course it does, you have a ) too much. Besides this, the following
script does not make a fatal error:
<?php
$name = "derick";
array_pop(explode('.', $name));
?>
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org