3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test() { static $a = 0, $b = 15; $a++; $b++; return $a; } $rf = new ReflectionFunction('test'); // result - Array ( [a] => 0 [b] => 15 ) var_dump( $rf->getStaticVariables() );
Output for 5.0.0 - 7.2.0
array(2) { ["a"]=> int(0) ["b"]=> int(15) }
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/6SNnQ on line 11
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/6SNnQ on line 11