3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $result = array("array_reduce", "array_diff_uassoc", "array_diff_ukey", "array_udiff", "array_udiff_assoc", "array_intersect_uassoc", "array_intersect_ukey", "array_uintersect", "array_uintersect_assoc", "array_walk", "array_walk_recursive", "iterator_apply", "usort", "uasort", "uksort", "iterator_apply", "array_map", "array_filter", "register_shutdown_function", "filter_var", "filter_var_array", "filter_input", "filter_input_array", "call_user_func", "call_user_func_array", "eval", "assert", "preg_replace", "preg_filter", "create_function", "mb_ereg_replace", "mb_eregi_replace",); /* function show_all($keys){ global $result; foreach ($keys as $key) { if(is_array($key)) show_all($key); else{ $refFunc = new ReflectionFunction($key); foreach( $refFunc->getParameters() as $param ){ if(preg_match('/callback/',$param->name)) $result[$key] = 1; } } } } show_all(get_defined_functions()); */ foreach (array_keys($result) as $key) { print "$key:\n"; $refFunc = new ReflectionFunction($key); foreach( $refFunc->getParameters() as $param ){ print "\t$param\n"; } } ?>
Output for 7.0.0 - 7.1.0
0: Fatal error: Uncaught ReflectionException: Function 0() does not exist in /in/8ESjj:56 Stack trace: #0 /in/8ESjj(56): ReflectionFunction->__construct('0') #1 {main} thrown in /in/8ESjj on line 56
Process exited with code 255.
Output for hhvm-3.12.0
0: Fatal error: Uncaught exception 'ReflectionException' with message 'ReflectionFunction::__construct expects a string or a Closure, got integer' in /in/8ESjj:56 Stack trace: #0 /in/8ESjj(56): ReflectionFunction->__construct() #1 {main}
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.3 - 5.6.28
0: Fatal error: Uncaught exception 'ReflectionException' with message 'Function 0() does not exist' in /in/8ESjj:56 Stack trace: #0 /in/8ESjj(56): ReflectionFunction->__construct('0') #1 {main} thrown in /in/8ESjj on line 56
Process exited with code 255.
Output for 5.0.0 - 5.0.2
0: Fatal error: Uncaught exception 'ReflectionException' with message 'Function 0() does not exist' in /in/8ESjj:56 Stack trace: #0 {main} thrown in /in/8ESjj on line 56
Process exited with code 255.
Output for 4.3.2 - 4.4.9
0: Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/8ESjj on line 56
Process exited with code 255.
Output for 4.3.0 - 4.3.1
0: Fatal error: Cannot instantiate non-existent class: reflectionfunction in /in/8ESjj on line 56