3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class C {} $obj = new C; $reflObj = new \ReflectionObject($obj); $reflMethod = $reflObj->getMethod('foo'); var_export($reflMethod);
based on OlbBU
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught ReflectionException: Method foo does not exist in /in/18gPS:7 Stack trace: #0 /in/18gPS(7): ReflectionClass->getMethod('foo') #1 {main} thrown in /in/18gPS on line 7
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Fatal error: Uncaught exception 'ReflectionException' with message 'Method foo does not exist' in /in/18gPS:7 Stack trace: #0 /in/18gPS(7): ReflectionClass->getMethod('foo') #1 {main} thrown in /in/18gPS on line 7
Process exited with code 255.