php-src/ext/opcache/tests/optimize_static_001.phpt
Max Semenik e9f783fcdd Migrate skip checks to --EXTENSIONS--, p3
For rationale, see #6787

Extensions migrated in part 3:
* ftp
* gmp
* iconv
* opcache
* shmop
2021-04-03 15:23:25 +02:00

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