rfc:ternary_associativity
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:ternary_associativity [2019/04/17 10:19] – nesting in middle operand not affected nikic | rfc:ternary_associativity [2019/05/13 15:51] (current) – nikic | ||
---|---|---|---|
Line 2: | Line 2: | ||
* Date: 2019-04-09 | * Date: 2019-04-09 | ||
* Author: Nikita Popov < | * Author: Nikita Popov < | ||
- | * Status: | + | * Status: |
* Target Version: PHP 7.4 and PHP 8.0 | * Target Version: PHP 7.4 and PHP 8.0 | ||
* Implementation: | * Implementation: | ||
Line 93: | Line 93: | ||
Code exploiting left-associativity of the ternary operator will become a hard error in PHP 8. As | Code exploiting left-associativity of the ternary operator will become a hard error in PHP 8. As | ||
left-associative ternaries are almost certainly bugs, the impact of this change should be minimal. | left-associative ternaries are almost certainly bugs, the impact of this change should be minimal. | ||
+ | |||
+ | An analysis of the top 1000 composer packages found 12 instances that will be affected by this RFC. 9 of them are bugs, where a right-associative meaning was intended, but a left-associative one will be used. 3 uses of the form '' | ||
===== Future Scope ===== | ===== Future Scope ===== | ||
- | We could make the ternary right-associative, either directly | + | We could make the ternary right-associative in a later release, after it has been an error for a while. |
- | after it has been an error for a while. Because the current left-associative interpretation is so | + | |
- | unlikely to be used intentionally, | + | |
===== Vote ===== | ===== Vote ===== | ||
- | Straightforward | + | Voting started 2019-04-23 and ends 2019-05-07. |
+ | |||
+ | <doodle title=" | ||
+ | | ||
+ | | ||
+ | </ | ||
rfc/ternary_associativity.1555496391.txt.gz · Last modified: 2019/04/17 10:19 by nikic