1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 01:48:26 +02:00
Files
archived-php-src/ext/opcache/tests/jit/assign_043.phpt
T
Nikita Popov b564113756 Check exception after undef var notice
For simple assignments, we may not emit an exception check elsewhere,
so perform it directly after the undef var notice.
2021-10-07 16:54:26 +02:00

23 lines
408 B
PHP

--TEST--
JIT ASSIGN: Undef var notice promoted to exception
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
opcache.protect_memory=1
--FILE--
<?php
set_error_handler(function($_, $m) {
throw new Exception($m);
});
try {
$a = $b;
NOT_REACHED;
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Undefined variable $b