3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump( (new ReflectionClass(RuntimeException::class))->getMethods() );
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
array(10) { [0]=> object(ReflectionMethod)#2 (2) { ["name"]=> string(11) "__construct" ["class"]=> string(9) "Exception" } [1]=> object(ReflectionMethod)#3 (2) { ["name"]=> string(8) "__wakeup" ["class"]=> string(9) "Exception" } [2]=> object(ReflectionMethod)#4 (2) { ["name"]=> string(10) "getMessage" ["class"]=> string(9) "Exception" } [3]=> object(ReflectionMethod)#5 (2) { ["name"]=> string(7) "getCode" ["class"]=> string(9) "Exception" } [4]=> object(ReflectionMethod)#6 (2) { ["name"]=> string(7) "getFile" ["class"]=> string(9) "Exception" } [5]=> object(ReflectionMethod)#7 (2) { ["name"]=> string(7) "getLine" ["class"]=> string(9) "Exception" } [6]=> object(ReflectionMethod)#8 (2) { ["name"]=> string(8) "getTrace" ["class"]=> string(9) "Exception" } [7]=> object(ReflectionMethod)#9 (2) { ["name"]=> string(11) "getPrevious" ["class"]=> string(9) "Exception" } [8]=> object(ReflectionMethod)#10 (2) { ["name"]=> string(16) "getTraceAsString" ["class"]=> string(9) "Exception" } [9]=> object(ReflectionMethod)#11 (2) { ["name"]=> string(10) "__toString" ["class"]=> string(9) "Exception" } }
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 array(10) { [0]=> object(ReflectionMethod)#2 (2) { ["name"]=> string(11) "__construct" ["class"]=> string(9) "Exception" } [1]=> object(ReflectionMethod)#3 (2) { ["name"]=> string(8) "__wakeup" ["class"]=> string(9) "Exception" } [2]=> object(ReflectionMethod)#4 (2) { ["name"]=> string(10) "getMessage" ["class"]=> string(9) "Exception" } [3]=> object(ReflectionMethod)#5 (2) { ["name"]=> string(7) "getCode" ["class"]=> string(9) "Exception" } [4]=> object(ReflectionMethod)#6 (2) { ["name"]=> string(7) "getFile" ["class"]=> string(9) "Exception" } [5]=> object(ReflectionMethod)#7 (2) { ["name"]=> string(7) "getLine" ["class"]=> string(9) "Exception" } [6]=> object(ReflectionMethod)#8 (2) { ["name"]=> string(8) "getTrace" ["class"]=> string(9) "Exception" } [7]=> object(ReflectionMethod)#9 (2) { ["name"]=> string(11) "getPrevious" ["class"]=> string(9) "Exception" } [8]=> object(ReflectionMethod)#10 (2) { ["name"]=> string(16) "getTraceAsString" ["class"]=> string(9) "Exception" } [9]=> object(ReflectionMethod)#11 (2) { ["name"]=> string(10) "__toString" ["class"]=> string(9) "Exception" } }
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
array(11) { [0]=> object(ReflectionMethod)#2 (2) { ["name"]=> string(7) "__clone" ["class"]=> string(9) "Exception" } [1]=> object(ReflectionMethod)#3 (2) { ["name"]=> string(11) "__construct" ["class"]=> string(9) "Exception" } [2]=> object(ReflectionMethod)#4 (2) { ["name"]=> string(8) "__wakeup" ["class"]=> string(9) "Exception" } [3]=> object(ReflectionMethod)#5 (2) { ["name"]=> string(10) "getMessage" ["class"]=> string(9) "Exception" } [4]=> object(ReflectionMethod)#6 (2) { ["name"]=> string(7) "getCode" ["class"]=> string(9) "Exception" } [5]=> object(ReflectionMethod)#7 (2) { ["name"]=> string(7) "getFile" ["class"]=> string(9) "Exception" } [6]=> object(ReflectionMethod)#8 (2) { ["name"]=> string(7) "getLine" ["class"]=> string(9) "Exception" } [7]=> object(ReflectionMethod)#9 (2) { ["name"]=> string(8) "getTrace" ["class"]=> string(9) "Exception" } [8]=> object(ReflectionMethod)#10 (2) { ["name"]=> string(11) "getPrevious" ["class"]=> string(9) "Exception" } [9]=> object(ReflectionMethod)#11 (2) { ["name"]=> string(16) "getTraceAsString" ["class"]=> string(9) "Exception" } [10]=> object(ReflectionMethod)#12 (2) { ["name"]=> string(10) "__toString" ["class"]=> string(9) "Exception" } }

preferences:
139.08 ms | 405 KiB | 178 Q