Re: ref fix revisited
| From: | Zeev Suraski | Date: | Tue, 13 Sep 2005 18:28:13 +0000 |
| Subject: | Re: ref fix revisited | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-18843@lists.php.net to get a copy of this message | ||
At 18:07 12/09/2005, Derick Rethans wrote:
On Mon, 12 Sep 2005, Zeev Suraski wrote: I don't really agree that it's out of whack, since you are passing a piece of data by reference, which is an undefined behavior. I agree that it would have been nice if we could allow for this and only complain if the data is written to in the function (in the PHP spirit of 'just work!'), but I don't see how that would be possible. Works for PHP 4.4 just fine with a notice...Of course we could switch to a NOTICE, but then we're still risking memory corruption. I was saying that I don't see how it's possible to warn 'JIT', i.e. accept the pass-by-ref, and complain only if the function actually tries to write to it. Zeev