xref: /PHP-8.2/Zend/tests/match/008.phpt (revision 9fa1d133)
1--TEST--
2Match expression multiple conditions per case
3--FILE--
4<?php
5
6function is_working_day($day) {
7    return match ($day) {
8        1, 7 => false,
9        2, 3, 4, 5, 6 => true,
10    };
11}
12
13for ($i = 1; $i <= 7; $i++) {
14    var_dump(is_working_day($i));
15}
16
17?>
18--EXPECT--
19bool(false)
20bool(true)
21bool(true)
22bool(true)
23bool(true)
24bool(true)
25bool(false)
26