rfc:saner-inc-dec-operators
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
rfc:saner-inc-dec-operators [2023/01/20 17:13] – Version 0.3 girgias | rfc:saner-inc-dec-operators [2023/07/12 14:11] – Close vote girgias | ||
---|---|---|---|
Line 4: | Line 4: | ||
* Date: 2022-11-21 | * Date: 2022-11-21 | ||
* Author: George Peter Banyard, < | * Author: George Peter Banyard, < | ||
- | * Status: | + | * Status: |
* Target Version: PHP 8.3, PHP 8.(3+x), and PHP 9.0 | * Target Version: PHP 8.3, PHP 8.(3+x), and PHP 9.0 | ||
* Implementation: | * Implementation: | ||
Line 68: | Line 68: | ||
</ | </ | ||
- | The only examples of an internal class that does not implements | + | The only examples of an internal class that does not implement |
<PHP> | <PHP> | ||
$o = tidy_parse_string("< | $o = tidy_parse_string("< | ||
Line 134: | Line 134: | ||
</ | </ | ||
- | For non-numeric '' | + | For non-numeric '' |
=== Current behaviour of the decrement operator with values of type null and non-numeric string === | === Current behaviour of the decrement operator with values of type null and non-numeric string === | ||
Line 394: | Line 394: | ||
</ | </ | ||
- | * to emit < | + | * to emit < |
<PHP> | <PHP> | ||
$n = null; | $n = null; | ||
Line 525: | Line 525: | ||
Therefore, we consider the value of reducing the semantic complexity of PHP higher than keeping support for this feature in its current form. | Therefore, we consider the value of reducing the semantic complexity of PHP higher than keeping support for this feature in its current form. | ||
- | The introduction of the < | + | The introduction of the < |
<PHP> | <PHP> | ||
function str_increment_polyfill(string $s): string { | function str_increment_polyfill(string $s): string { | ||
Line 549: | Line 549: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | ==== Impact of deprecating the PERL string increment feature on userland ==== | ||
+ | |||
+ | To determine the impact of this RFC on userland, the static analysis tool [[https:// | ||
+ | |||
+ | The only non-false-positive use cases using the PERL string increment feature are: | ||
+ | |||
+ | * Generating a list of valid unicode (or ASCII) characters. The most popular project using this is HTMLPurifier, | ||
+ | * Generating sequential IDs. The main library doing this is amphp/amp, however a lot of other projects depend on this library. | ||
+ | * Incrementing a spreadsheet column. | ||
+ | |||
+ | In any of these cases, no deprecation notices would be emitted in the first stage of this RFC. | ||
+ | As the first stage of this RFC also provides the < | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
Line 561: | Line 574: | ||
One possible future scope is to add support to both arithmetic operations and the increment/ | One possible future scope is to add support to both arithmetic operations and the increment/ | ||
+ | |||
+ | One other possible extension is to add a < | ||
===== Proposed PHP Version ===== | ===== Proposed PHP Version ===== | ||
Line 570: | Line 585: | ||
As per the voting RFC a yes/no vote with a 2/3 majority is needed for this proposal to be accepted. | As per the voting RFC a yes/no vote with a 2/3 majority is needed for this proposal to be accepted. | ||
- | Voting started on 2023-XX-XX and will end on 2023-XX-XX. | + | Voting started on 2023-06-28 and will end on 2023-07-12. |
<doodle title=" | <doodle title=" | ||
* Yes | * Yes |
rfc/saner-inc-dec-operators.txt · Last modified: 2023/07/17 14:52 by girgias