3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class C { static function foo() {} } function foo() {} new ReflectionMethod('foo'); new ReflectionMethod('C::foo');
based on iCmGV
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught ReflectionException: Invalid method name foo in /in/64mBO:9 Stack trace: #0 /in/64mBO(9): ReflectionMethod->__construct('foo') #1 {main} thrown in /in/64mBO on line 9
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Uncaught exception 'ReflectionException' with message 'Invalid method name foo' in /in/64mBO:9 Stack trace: #0 /in/64mBO(9): ReflectionMethod->__construct('foo') #1 {main} thrown in /in/64mBO on line 9
Process exited with code 255.