3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class C {} $obj = new C; $reflObj = new \ReflectionObject(NULL); $reflMethod = $reflObj->getMethod('foo'); var_export($reflMethod);
based on 18gPS
Output for 7.1.0 - 7.2.0
Warning: ReflectionObject::__construct() expects parameter 1 to be object, null given in /in/3p2Wc on line 6 Fatal error: Uncaught Error: Internal error: Failed to retrieve the reflection object in /in/3p2Wc:7 Stack trace: #0 /in/3p2Wc(7): ReflectionClass->getMethod('foo') #1 {main} thrown in /in/3p2Wc on line 7
Process exited with code 255.
Output for 5.3.20 - 7.0.20
Warning: ReflectionObject::__construct() expects parameter 1 to be object, null given in /in/3p2Wc on line 6 Fatal error: ReflectionClass::getMethod(): Internal error: Failed to retrieve the reflection object in /in/3p2Wc on line 7
Process exited with code 255.