mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
25 lines
387 B
PHP
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)
|
|
}
|