rfc:deprecations_php_7_2
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
rfc:deprecations_php_7_2 [2016/11/07 21:13] – created nikic | rfc:deprecations_php_7_2 [2017/08/12 18:36] – nikic | ||
---|---|---|---|
Line 2: | Line 2: | ||
* Date: 2015-12-28 | * Date: 2015-12-28 | ||
* Author: Nikita Popov < | * Author: Nikita Popov < | ||
- | * Status: | + | * Status: |
- | * Discussion: http:// | + | * Discussion: http:// |
* Originally published under: https:// | * Originally published under: https:// | ||
Line 19: | Line 19: | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
Line 25: | Line 24: | ||
===== Proposal ===== | ===== Proposal ===== | ||
+ | |||
+ | Each feature proposed for deprecation is voted separately. Each vote requires a 2/3 majority, independently of whether it is a language or standard library change. All votes refer to deprecation in PHP 7.2 and removal in the next major version (presumably PHP 8.0). | ||
==== __autoload ==== | ==== __autoload ==== | ||
Line 31: | Line 32: | ||
Proposed action: A deprecation notice is thrown when a global function with name '' | Proposed action: A deprecation notice is thrown when a global function with name '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== $php_errormsg ==== | ==== $php_errormsg ==== | ||
Line 39: | Line 45: | ||
Proposed action: A deprecation notice is thrown if the '' | Proposed action: A deprecation notice is thrown if the '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== create_function() ==== | ==== create_function() ==== | ||
Line 47: | Line 58: | ||
Proposed action: Mark the function as deprecated, thus issuing a deprecation notice on every call. | Proposed action: Mark the function as deprecated, thus issuing a deprecation notice on every call. | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== mbstring.func_overload ==== | ==== mbstring.func_overload ==== | ||
Line 59: | Line 75: | ||
Tracking bug: [[https:// | Tracking bug: [[https:// | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== (unset) cast ==== | ==== (unset) cast ==== | ||
Line 65: | Line 86: | ||
Proposed action: Throw a deprecation notice if an '' | Proposed action: Throw a deprecation notice if an '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== parse_str() without second argument ==== | ==== parse_str() without second argument ==== | ||
Line 73: | Line 99: | ||
Proposed action: Throw a deprecation notice if the second argument of '' | Proposed action: Throw a deprecation notice if the second argument of '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== gmp_random() ==== | ==== gmp_random() ==== | ||
Line 82: | Line 113: | ||
Proposed action: Mark the function as deprecated, thus issuing a deprecation notice on every call. | Proposed action: Mark the function as deprecated, thus issuing a deprecation notice on every call. | ||
- | ==== (binary) cast and b"" | + | <doodle title=" |
- | + | * Yes | |
- | The binary cast and binary string literals were originally introduced as forward-compatibility features for PHP 6. Currently they behave identically to ordinary (string) casts and ordinary string literals. Given that PHP 6 has been dead for years and it is unlikely that it will be resurrected in the same form, it is time to remove these forward-compatibility tokens. | + | * No |
- | + | </ | |
- | Proposed action: Throw a compile-time deprecation whenever binary casts or binary string literals are used. | + | |
==== each() ==== | ==== each() ==== | ||
Line 102: | Line 132: | ||
Proposed action: As '' | Proposed action: As '' | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== assert() with string argument ==== | ==== assert() with string argument ==== | ||
Line 111: | Line 146: | ||
This behavior of '' | This behavior of '' | ||
- | Proposed action: Throw a deprecation notice if '' | + | Proposed action: Throw a deprecation notice if '' |
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
==== $errcontext argument of error handler ==== | ==== $errcontext argument of error handler ==== | ||
Line 118: | Line 158: | ||
This functionality is problematic for optimization, | This functionality is problematic for optimization, | ||
+ | |||
+ | Note that the error context only contains the local variables at the error-site. The error backtrace, including '' | ||
Proposed action: Throw deprecation notice if error handler has five or more arguments. Otherwise, do not pass the '' | Proposed action: Throw deprecation notice if error handler has five or more arguments. Otherwise, do not pass the '' | ||
+ | |||
+ | **Update:** Due to technical issues, this does not throw a deprecation warning. It is a documentation-only deprecation. | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
+ | |||
+ | ==== (binary) cast and b"" | ||
+ | |||
+ | This deprecation has been extracted into a separate RFC: [[rfc/ | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
- | For PHP 7.1 additional deprecation notices will appear. For PHP 8.0 the previously deprecated functionality will no longer be available. | + | For PHP 7.2 additional deprecation notices will appear. For PHP 8.0 the previously deprecated functionality will no longer be available. |
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
Line 147: | Line 200: | ||
* Second argument to '' | * Second argument to '' | ||
* The ticks mechanism, which is obsoleted by async signal handling. | * The ticks mechanism, which is obsoleted by async signal handling. | ||
+ | * '' | ||
+ | * The '' | ||
===== Rejected deprecations ===== | ===== Rejected deprecations ===== | ||
Line 157: | Line 212: | ||
The motivations for removing this functionality are similar to those of '' | The motivations for removing this functionality are similar to those of '' | ||
- | |||
- | ===== Changelog ===== | ||
- | |||
- | * 2016-02-19: Added (unset) cast | ||
- | * 2016-02-19: Added mbstring.func_overload | ||
- | * 2016-02-18: Added getrandmax() |
rfc/deprecations_php_7_2.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1