mirror of
https://github.com/php/php-src.git
synced 2026-04-28 18:53:33 +02:00
9fa1d13301
RFC: https://wiki.php.net/rfc/match_expression_v2 Closes GH-5371.
20 lines
292 B
PHP
20 lines
292 B
PHP
--TEST--
|
|
Implicit break in match expression
|
|
--FILE--
|
|
<?php
|
|
|
|
function dump_and_return($string) {
|
|
var_dump($string);
|
|
return $string;
|
|
}
|
|
|
|
var_dump(match ('foo') {
|
|
'foo' => dump_and_return('foo'),
|
|
'bar' => dump_and_return('bar'),
|
|
});
|
|
|
|
?>
|
|
--EXPECT--
|
|
string(3) "foo"
|
|
string(3) "foo"
|