mirror of
https://github.com/php/php-src.git
synced 2025-01-07 11:34:09 +08:00
e9f783fcdd
For rationale, see #6787 Extensions migrated in part 3: * ftp * gmp * iconv * opcache * shmop
24 lines
403 B
PHP
24 lines
403 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
|
|
--EXTENSIONS--
|
|
opcache
|
|
--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
|