xref: /PHP-8.4/Zend/tests/match/011.phpt (revision 9fa1d133)
1--TEST--
2Implicit break in match expression
3--FILE--
4<?php
5
6function dump_and_return($string) {
7    var_dump($string);
8    return $string;
9}
10
11var_dump(match ('foo') {
12    'foo' => dump_and_return('foo'),
13    'bar' => dump_and_return('bar'),
14});
15
16?>
17--EXPECT--
18string(3) "foo"
19string(3) "foo"
20