xref: /PHP-8.1/ext/opcache/tests/jit/bind_static.phpt (revision b610dce0)
1--TEST--
2Bind static may throw
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit_buffer_size=1M
8--FILE--
9<?php
10function test() {
11    static $N = UNDEFINED;
12    throw new Exception;
13}
14try {
15    test();
16} catch (Error $e) {
17    echo $e->getMessage(), "\n";
18}
19
20?>
21--EXPECT--
22Undefined constant "UNDEFINED"
23