3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $n = new ReflectionFunction(); $a = array('ReflectionFunction','export'); $a('phpinfo',true);
based on paiVv
Output for 7.1.0
Fatal error: Uncaught ArgumentCountError: ReflectionFunction::__construct() expects exactly 1 parameter, 0 given in /in/K9Nkq:2 Stack trace: #0 /in/K9Nkq(2): ReflectionFunction->__construct() #1 {main} thrown in /in/K9Nkq on line 2
Process exited with code 255.
Output for 7.0.0 - 7.0.14
Fatal error: Uncaught TypeError: ReflectionFunction::__construct() expects exactly 1 parameter, 0 given in /in/K9Nkq:2 Stack trace: #0 /in/K9Nkq(2): ReflectionFunction->__construct() #1 {main} thrown in /in/K9Nkq on line 2
Process exited with code 255.
Output for hhvm-3.12.0
Warning: __construct() expects exactly 1 parameter, 0 given in /in/K9Nkq on line 2 Notice: Undefined variable: name_or_closure in /in/K9Nkq on line 2 Notice: Undefined variable: name_or_closure in /in/K9Nkq on line 2 Notice: Undefined variable: name_or_closure in /in/K9Nkq on line 2 Fatal error: Uncaught exception 'ReflectionException' with message 'ReflectionFunction::__construct expects a string or a Closure, got NULL' in /in/K9Nkq:2 Stack trace: #0 /in/K9Nkq(2): ReflectionFunction->__construct() #1 {main}
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.0 - 5.6.28
Warning: ReflectionFunction::__construct() expects exactly 1 parameter, 0 given in /in/K9Nkq on line 2
Output for 5.0.0 - 5.3.29
Warning: ReflectionFunction::__construct() expects exactly 1 parameter, 0 given in /in/K9Nkq on line 2 Fatal error: Function name must be a string in /in/K9Nkq on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/K9Nkq on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/K9Nkq on line 2