mirror of
https://github.com/php/php-src.git
synced 2026-03-28 02:02:32 +01:00
The evaluation of the initializer may throw. This could be refined by checking whether the initializer is a constant AST. For now just fix the miscompile.
23 lines
344 B
PHP
23 lines
344 B
PHP
--TEST--
|
|
Bind static may throw
|
|
--INI--
|
|
opcache.enable=1
|
|
opcache.enable_cli=1
|
|
opcache.file_update_protection=0
|
|
opcache.jit_buffer_size=1M
|
|
--FILE--
|
|
<?php
|
|
function test() {
|
|
static $N = UNDEFINED;
|
|
throw new Exception;
|
|
}
|
|
try {
|
|
test();
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Undefined constant "UNDEFINED"
|