rfc:match_expression
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:match_expression [2020/04/24 20:18] – Remove proposed PHP version in middle ilijatovilo | rfc:match_expression [2020/04/24 20:29] – Typo ilijatovilo | ||
---|---|---|---|
Line 212: | Line 212: | ||
</ | </ | ||
- | For the time being the following code will result | + | For the time being using blocks in match expressions that use the return value in any way results |
<code php> | <code php> | ||
Line 218: | Line 218: | ||
0 => {}, | 0 => {}, | ||
}; | }; | ||
+ | //> Match that is not used as a statement can't contain blocks | ||
- | //> Match that not used as a statement can't contain blocks | + | foo(match ($x) { |
+ | 0 => {}, | ||
+ | }); | ||
+ | //> Match that is not used as a statement can't contain blocks | ||
+ | |||
+ | 1 + match ($x) { | ||
+ | 0 => {}, | ||
+ | }; | ||
+ | //> Match that is not used as a statement can't contain blocks | ||
+ | |||
+ | //etc. | ||
+ | |||
+ | // Only allowed form | ||
+ | match ($x) { | ||
+ | 0 => {}, | ||
+ | } | ||
</ | </ | ||
Line 261: | Line 277: | ||
</ | </ | ||
- | When '' | + | A '' |
<code php> | <code php> | ||
Line 505: | Line 521: | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
- | As this is a language change, a 2/3 majority is required. The vote is a straight Yes/No vote for accepting the RFC and merging the patch. | + | As this is a language change, a 2/3 majority is required. |
<doodle title=" | <doodle title=" |
rfc/match_expression.txt · Last modified: 2020/05/09 15:59 by ilijatovilo