Re: allow_call_time_pass_reference
| From: | Hannes Magnusson | Date: | Thu, 08 May 2008 21:29:02 +0000 |
| Subject: | Re: allow_call_time_pass_reference | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37553@lists.php.net to get a copy of this message | ||
On Thu, May 8, 2008 at 9:28 PM, Steph Fox <steph@zend.com> wrote:
> Does anyone have a good reason for keeping it switched on by default in PHP
> 5.3? Like, would switching it off by default break a lot of existing code,
> given that most users are a bit beyond PHP 3 now?
I've never understood the warning that switch throws:
bjori@lindsay:~$ php -dallow_call_time_pass_reference=0 -r 'strpos(&$var, 0);'
Warning: Call-time pass-by-reference has been deprecated; If you
would like to pass it by reference, modify the declaration of
strpos(). If you would like to enable call-time pass-by-reference,
you can set allow_call_time_pass_reference to true in your INI file.
in Command line code on line 1
However, turning it on will not throw any warning or deprecated notice, wtf?
I'd say throw the warning if the switch is on and someone does
call-time-pass-by-reference and turn that switch off by default.
-Hannes