3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { public static function bar () { } } var_dump(new ReflectionMethod(['Foo', 'bar']));
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: ReflectionMethod::__construct() expects parameter 1 to be string, array given in /in/Sivc5:5 Stack trace: #0 /in/Sivc5(5): ReflectionMethod->__construct(Array) #1 {main} thrown in /in/Sivc5 on line 5
Process exited with code 255.
Output for 5.4.9 - 5.6.28
Warning: ReflectionMethod::__construct() expects parameter 1 to be string, array given in /in/Sivc5 on line 5 object(ReflectionMethod)#1 (2) { ["name"]=> string(0) "" ["class"]=> string(0) "" }
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/Sivc5 on line 5
Process exited with code 255.