3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $c = new ReflectionClass('ArithmeticError'); var_dump($c->getConstants(), $c->getMethods()); var_dump(get_parent_class("ArithmeticError"));
Output for 7.0.0 - 7.2.0
array(0) { } array(11) { [0]=> object(ReflectionMethod)#2 (2) { ["name"]=> string(7) "__clone" ["class"]=> string(5) "Error" } [1]=> object(ReflectionMethod)#3 (2) { ["name"]=> string(11) "__construct" ["class"]=> string(5) "Error" } [2]=> object(ReflectionMethod)#4 (2) { ["name"]=> string(8) "__wakeup" ["class"]=> string(5) "Error" } [3]=> object(ReflectionMethod)#5 (2) { ["name"]=> string(10) "getMessage" ["class"]=> string(5) "Error" } [4]=> object(ReflectionMethod)#6 (2) { ["name"]=> string(7) "getCode" ["class"]=> string(5) "Error" } [5]=> object(ReflectionMethod)#7 (2) { ["name"]=> string(7) "getFile" ["class"]=> string(5) "Error" } [6]=> object(ReflectionMethod)#8 (2) { ["name"]=> string(7) "getLine" ["class"]=> string(5) "Error" } [7]=> object(ReflectionMethod)#9 (2) { ["name"]=> string(8) "getTrace" ["class"]=> string(5) "Error" } [8]=> object(ReflectionMethod)#10 (2) { ["name"]=> string(11) "getPrevious" ["class"]=> string(5) "Error" } [9]=> object(ReflectionMethod)#11 (2) { ["name"]=> string(16) "getTraceAsString" ["class"]=> string(5) "Error" } [10]=> object(ReflectionMethod)#12 (2) { ["name"]=> string(10) "__toString" ["class"]=> string(5) "Error" } } string(5) "Error"
Output for 5.0.3 - 5.6.28
Fatal error: Uncaught exception 'ReflectionException' with message 'Class ArithmeticError does not exist' in /in/3RTZ5:3 Stack trace: #0 /in/3RTZ5(3): ReflectionClass->__construct('ArithmeticError') #1 {main} thrown in /in/3RTZ5 on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Fatal error: Uncaught exception 'ReflectionException' with message 'Class ArithmeticError does not exist' in /in/3RTZ5:3 Stack trace: #0 {main} thrown in /in/3RTZ5 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionclass in /in/3RTZ5 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionclass in /in/3RTZ5 on line 3