3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function g($a=NULL, $b=NULL) { $ref = new ReflectionFunction(__FUNCTION__); return $ref; } g(); var_export(g());
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
ReflectionFunction::__set_state(array( 'name' => 'g', ))
Output for hhvm-3.10.0 - 3.12.0
ReflectionFunction::__set_state(array( 'name' => 'g', 'closure' => NULL, 'params' => NULL, ))
Output for 5.0.0 - 5.0.5
class ReflectionFunction { public $name = 'g'; }
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/pA5kk on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/pA5kk on line 3