3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php set_error_handler(function() { throw new Exception(); }); class A { public function method($test = UNKNOWN_CONSTANT) { } } $class = new ReflectionClass('A'); echo $class;
Output for 7.0.1 - 7.0.11, 7.1.7 - 7.3.1
Fatal error: Method ReflectionClass::__toString() must not throw an exception, caught Exception: in /in/ekEkd on line 0
Process exited with code 255.
Output for 7.0.12 - 7.1.6

Process exited with code 139.
Output for 5.6.0 - 5.6.30, 7.0.0
Fatal error: Method ReflectionClass::__toString() must not throw an exception in /in/ekEkd on line 0
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught exception 'Exception' with message '' in /in/ekEkd:4 Stack trace: #0 (1): Closure$() #1 (): include() #2 (): ReflectionFunctionAbstract->getParamInfo() #3 (): ReflectionFunctionAbstract->getParameters() #4 (): ReflectionFunctionAbstract->__toStringHelper() #5 (): ReflectionMethod->__toString() #6 /in/ekEkd(16): ReflectionClass->__toString() #7 {main}
Process exited with code 255.