mirror of
https://github.com/php/php-src.git
synced 2026-04-17 13:01:02 +02:00
While we can't drop the loop free, we can drop other instructions in the same block. We should also indicate that it no longer has predecessors.
22 lines
312 B
PHP
22 lines
312 B
PHP
--TEST--
|
|
match expression always errors
|
|
--FILE--
|
|
<?php
|
|
function get_value() {
|
|
return 0;
|
|
}
|
|
function test() {
|
|
match(get_value()) {
|
|
false => $a,
|
|
true => $b,
|
|
};
|
|
}
|
|
try {
|
|
test();
|
|
} catch (UnhandledMatchError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Unhandled match case 0
|