1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/ext/opcache/tests/match_always_error.phpt
Nikita Popov e0e5b59d2e Try harder to clean up unreachable loop free block
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.
2021-09-17 16:32:29 +02:00

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