1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2024-12-02 17:28:27 +01:00
PHP-Parser/test/code/prettyPrinter/expr/match.test
Tomas Votruba 69c5d48afd
[PHP 8.0] Add match expressions (#672)
RFC:  https://wiki.php.net/rfc/match_expression_v2
Upstream implementation: php/php-src#5371

Closes #671.
2020-07-15 21:40:05 +02:00

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',
};