1--TEST--
2Keep BIND_STATIC when initial value refer to unresolved constants
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--EXTENSIONS--
8opcache
9--FILE--
10<?php
11function foo() {
12    static $a = UNDEFINED_CONST;
13}
14try {
15    foo();
16} catch (Throwable $e) {
17    echo "Exception: " . $e->getMessage() . "\n";
18}
19?>
20OK
21--EXPECT--
22Exception: Undefined constant "UNDEFINED_CONST"
23OK
24