rfc:concatenation_precedence
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:concatenation_precedence [2019/03/28 13:29] – bwoebi | rfc:concatenation_precedence [2020/08/01 23:54] (current) – RFC was implemented carusogabriel | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2019-03-28 | * Date: 2019-03-28 | ||
* Author: Bob Weinand, bobwei9@hotmail.com | * Author: Bob Weinand, bobwei9@hotmail.com | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 28: | Line 28: | ||
This is counter-intuitive though: you rarely want to add or subtract concatenated strings which in general are not numbers. However, given PHPs capability of seamlessly converting an integer to a string, concatenation of these values is desired. | This is counter-intuitive though: you rarely want to add or subtract concatenated strings which in general are not numbers. However, given PHPs capability of seamlessly converting an integer to a string, concatenation of these values is desired. | ||
- | Thus, the RFC proposes to give ' | + | Thus, the RFC proposes to give ' |
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
- | Every unparenthesized expression featuring an ' | + | Every unparenthesized expression featuring an ' |
While this is a subtle behavior change in that it will give different outputs without notice or warning, it is trivially possible to statically analyze the code and find all instances where this happens. As to my knowledge these occurrences are quite rare as it almost always is an error in the current form, rendering the impact minimal. | While this is a subtle behavior change in that it will give different outputs without notice or warning, it is trivially possible to statically analyze the code and find all instances where this happens. As to my knowledge these occurrences are quite rare as it almost always is an error in the current form, rendering the impact minimal. | ||
+ | |||
+ | As Nikita mentioned on the mailing list: http:// | ||
===== Proposed PHP Version(s) ===== | ===== Proposed PHP Version(s) ===== | ||
Line 40: | Line 42: | ||
PHP 8, with a deprecation notice in PHP 7.4 upon encountering an unparenthesized expression containing an ' | PHP 8, with a deprecation notice in PHP 7.4 upon encountering an unparenthesized expression containing an ' | ||
- | ===== Proposed Voting Choices | + | ===== Vote ===== |
+ | |||
+ | Voting started 2019-04-30 and ends 2019-05-14. The first (primary) voting requires a 2/3 majority. The second (secondary) voting requires a 50%+1 majority. | ||
- | Primary vote (2/3 majority): | + | <doodle title=" |
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
- | Secondary vote (simple majority): | + | <doodle title="Emit a deprecation notice in PHP 7.4 if the RFC is accepted?" |
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
===== Patch ===== | ===== Patch ===== |
rfc/concatenation_precedence.1553779770.txt.gz · Last modified: 2019/03/28 13:29 by bwoebi