1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/opcache/tests/optimize_static_003.phpt
2023-05-24 20:17:31 +02:00

25 lines
387 B
PHP

--TEST--
Keep BIND_STATIC when static variable has an initializer
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--EXTENSIONS--
opcache
--FILE--
<?php
function bar() {
return 42;
}
function foo() {
static $a = bar();
var_dump((new ReflectionFunction(__FUNCTION__))->getStaticVariables());
}
foo();
?>
--EXPECT--
array(1) {
["a"]=>
&int(42)
}