rfc:calltimebyref

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:calltimebyref [2008/05/21 13:29] sfoxrfc:calltimebyref [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 3: Line 3:
   * Date: 2008-05-21   * Date: 2008-05-21
   * Author: Steph Fox <sfox@php.net>   * Author: Steph Fox <sfox@php.net>
-  * Status: Under Discussion+  * Status: Implemented
   * First Published at: http://wiki.php.net/rfc/calltimebyref   * First Published at: http://wiki.php.net/rfc/calltimebyref
  
Line 16: Line 16:
 Before PHP 4.0 was released, ''allow_call_time_pass_reference'' was introduced as a means of retaining back compatibility with PHP 3, at the point where returning by reference from a function declaration became possible [1]. By default, the INI switch has been On since inception [2]. The warning (formerly ''E_COMPILE_WARNING'' but currently ''E_DEPRECATED'') is only thrown if the INI switch is Off. You therefore need to **explicitly** switch off the directive in order to discover that the behaviour is deprecated. Before PHP 4.0 was released, ''allow_call_time_pass_reference'' was introduced as a means of retaining back compatibility with PHP 3, at the point where returning by reference from a function declaration became possible [1]. By default, the INI switch has been On since inception [2]. The warning (formerly ''E_COMPILE_WARNING'' but currently ''E_DEPRECATED'') is only thrown if the INI switch is Off. You therefore need to **explicitly** switch off the directive in order to discover that the behaviour is deprecated.
  
-At the time ''allow_call_time_pass_reference'' was introduced, php.ini-recommended was interestingly referred to as 'php.ini-optimized'. Over the years, it has become fairly standard to regard php.ini-recommended as 'production settings'; things like ''display_errors=Off'' and ''log_errors=On'' have helped this perception along. For the last 8 years, therefore, the first anyone is likely to have known about their code being less than kosher is when it went live.+At the time ''allow_call_time_pass_reference'' was introduced, php.ini-recommended was interestingly referred to as 'php.ini-optimized'. Over the years, it has become fairly standard to regard php.ini-recommended as 'production settings'; things like ''display_errors=Off'' and ''log_errors=On'' have helped this perception along. From inception, ''allow_call_time_pass_reference'' was switched ''Off'' in php.ini-recommended but ''On'' in php.ini-dist and by default. For the last 8 years, therefore, the first anyone is likely to have known about their code being less than kosher is when it went live.
  
 Even in the current php.ini-recommended, the switch is attributed only to 'Code cleanliness'. The full entry in the heading about changed settings reads: Even in the current php.ini-recommended, the switch is attributed only to 'Code cleanliness'. The full entry in the heading about changed settings reads:
Line 51: Line 51:
   - [3] [[http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.676&r2=1.677]]   - [3] [[http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.676&r2=1.677]]
  
- +==== Comments ==== 
 +currently allow_call_time_pass_reference is set to Off in both php.ini-production and php.ini-development for 5.3, and Call-time pass-by-reference was removed from 5.4, so this RFC is implemented/obsolete.
rfc/calltimebyref.1211376592.txt.gz · Last modified: 2017/09/22 13:28 (external edit)