mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
0b1d750d91
Closes GH-9301
23 lines
461 B
PHP
23 lines
461 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 foo() {
|
|
// Eliminating this does have a small side effect of not showing & for $a when var_dumping static variables
|
|
static $a = 42;
|
|
var_dump((new ReflectionFunction(__FUNCTION__))->getStaticVariables());
|
|
}
|
|
foo();
|
|
?>
|
|
--EXPECT--
|
|
array(1) {
|
|
["a"]=>
|
|
int(42)
|
|
}
|