3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $reflection = new ReflectionClass("LogicException"); $methods = $reflection->getMethods(ReflectionMethod::IS_PUBLIC); foreach ($methods as $method) { print_r($method->getName()); echo "\n"; }
Output for 5.4.44 - 5.4.45, 5.5.28 - 5.5.35, 5.6.12 - 7.2.0
__construct __wakeup getMessage getCode getFile getLine getTrace getPrevious getTraceAsString __toString
Output for 5.3.0 - 5.4.43, 5.5.24 - 5.5.27, 5.6.8 - 5.6.11
__construct getMessage getCode getFile getLine getTrace getPrevious getTraceAsString __toString
Output for 5.1.3 - 5.2.17
__construct getMessage getCode getFile getLine getTrace getTraceAsString __toString
Output for 5.1.0 - 5.1.2
Fatal error: Undefined class constant 'IS_PUBLIC' in /in/ZBIiE on line 3
Process exited with code 255.
Output for 5.0.3 - 5.0.5
Fatal error: Uncaught exception 'ReflectionException' with message 'Class LogicException does not exist' in /in/ZBIiE:2 Stack trace: #0 /in/ZBIiE(2): ReflectionClass->__construct('LogicException') #1 {main} thrown in /in/ZBIiE on line 2
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Fatal error: Uncaught exception 'ReflectionException' with message 'Class LogicException does not exist' in /in/ZBIiE:2 Stack trace: #0 {main} thrown in /in/ZBIiE on line 2
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected ')', expecting '(' in /in/ZBIiE on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected ')', expecting '(' in /in/ZBIiE on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'('' in /in/ZBIiE on line 3
Process exited with code 255.