mirror of
https://github.com/php/php-src.git
synced 2026-03-30 04:02:19 +02:00
23 lines
418 B
PHP
23 lines
418 B
PHP
--TEST--
|
|
Keep BIND_STATIC when initial value refer to unresolved constants
|
|
--INI--
|
|
opcache.enable=1
|
|
opcache.enable_cli=1
|
|
opcache.optimization_level=-1
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
function foo() {
|
|
static $a = UNDEFINED_CONST;
|
|
}
|
|
try {
|
|
foo();
|
|
} catch (Throwable $e) {
|
|
echo "Exception: " . $e->getMessage() . "\n";
|
|
}
|
|
?>
|
|
OK
|
|
--EXPECT--
|
|
Exception: Undefined constant 'UNDEFINED_CONST'
|
|
OK
|