ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
[PHP-DEV] allow_call_time_pass_reference
by Steph Fox other posts by this author
May 8 2008 12:28PM messages near this date
#44949 [Opn->Bgs]: str_replace or str_ireplace don't work. | Re: [PHP-DEV] allow_call_time_pass_reference
Hi all,

Following a long and fairly embarrassing exchange of views with one of my 
php|architect authors, I finally discovered that 
allow_call_time_pass_reference is still on by default in PHP_5_3 (d'oh). 
This makes no sense to me because:

- it throws an E_DEPRECATED warning, which nobody will see during 
development because
- it's a PHP_INI_SYSTEM|PHP_INI_PERDIR setting that is switched on by 
default and
- on production sites, where it should be switched off, E_DEPRECATED is 
fairly likely to go unreported
- we've been advising people to switch it off for over 8 years

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?

If not, there's a trivial patch attached for main.c and both php.ini-* 
files.

As an aside, by-ref is actually faster than by-value under Windows in my 
tests, for small amounts of data. That was what you might call an unexpected 
result - it definitely isn't the case under *nix, or with very large arrays.

- Steph 
Thread:
Steph Fox
Hector Santos
Steph Fox
Steph Fox
Hector Santos
Hannes Magnusson
Todd Ruth
Hannes Magnusson
Todd Ruth
Steph Fox
Steph Fox
Stanislav Malyshev

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved