mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-12 09:09:41 +01:00
69c5d48afd
RFC: https://wiki.php.net/rfc/match_expression_v2 Upstream implementation: php/php-src#5371 Closes #671.
18 lines
215 B
Plaintext
18 lines
215 B
Plaintext
Match
|
|
-----
|
|
<?php
|
|
|
|
echo match (1) {
|
|
0, 1 => 'Foo',
|
|
// Comment
|
|
2 => 'Bar',
|
|
default => 'Foo',
|
|
};
|
|
-----
|
|
!!php7
|
|
echo match (1) {
|
|
0, 1 => 'Foo',
|
|
// Comment
|
|
2 => 'Bar',
|
|
default => 'Foo',
|
|
}; |