Re: allow_call_time_pass_reference
| From: | Steph Fox | Date: | Fri, 09 May 2008 00:31:01 +0000 |
| Subject: | Re: allow_call_time_pass_reference | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37557@lists.php.net to get a copy of this message | ||
Hi Hector,
As a new PHP extension author, it was one the first things I had to make sure was enabled to avoid the warning.<huge snip />
May I suggest to make it [Extension] INI ready? I explored this and it seem to work, but not sure if its really the case. It appears that adding it in my PHP.INI [extension_name] section appears to enabled the option only when the extension is loaded.The more I look into this, the weirder it seems. "The first issue that we raised was changing the E_NOTICE error for call-time-pass-by-reference to an E_ERROR, or simply throwing a parse error. We argued over this case and we decided to change this E_NOTICE to an E_STRICT instead as it was argued that there is nothing wrong with doing a call-time pass by reference." http://php.net/~derick/meeting-notes.html#deprecated-behaviour There's nothing wrong with it? So why throw an error at all? I have to say, I'm really confused over this. Either it's wrong, so you deliver a warning, or it's OK, so you don't. But what *really* bothers me is that the community seems to be under the impression that the rules changed with PHP 5, which is absolutely untrue. This threw an E_NOTICE under PHP 4.0 which has been shifted, first to E_STRICT (I haven't checked this) and then to E_DEPRECATED in 5.3. All I know is it's slower in most (not all) situations. So the real question is: should there be a warning at all? And if so, shouldn't it be there by default? - Steph