1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 23:18:13 +02:00
Files
archived-php-src/Zend/tests/match/008.phpt
T
2020-07-09 23:52:17 +02:00

26 lines
353 B
PHP

--TEST--
Match expression multiple conditions per case
--FILE--
<?php
function is_working_day($day) {
return match ($day) {
1, 7 => false,
2, 3, 4, 5, 6 => true,
};
}
for ($i = 1; $i <= 7; $i++) {
var_dump(is_working_day($i));
}
?>
--EXPECT--
bool(false)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(false)