1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00
Files
archived-php-src/Zend/tests/match/003.phpt
T
2020-07-09 23:52:17 +02:00

25 lines
315 B
PHP

--TEST--
Match expression default case
--FILE--
<?php
function get_value($i) {
return match ($i) {
1 => 1,
2 => 2,
default => 'default',
};
}
echo get_value(0) . "\n";
echo get_value(1) . "\n";
echo get_value(2) . "\n";
echo get_value(3) . "\n";
?>
--EXPECT--
default
1
2
default