3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test1() { // We have to check for existance because each call will try to define the function globally like including a file would. if (!function_exists('test2')) { function test2() { echo 'there' . PHP_EOL; } } echo 'here' . PHP_EOL; } echo "The internal method isn't defined yet: "; var_dump(function_exists('test2')); test1(); echo "Woops, function definitions don't get scoped by the function that define them. That's a feature but now we accidentally have a global function we might not have intended!: "; var_dump(function_exists('test2')); test2();

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.130.0040.01218.52
8.3.120.0080.00020.53
8.3.110.0130.00720.94
8.3.100.0040.00424.06
8.3.90.0040.00426.77
8.3.80.0060.00317.97
8.3.70.0110.00416.29
8.3.60.0120.00620.08
8.3.50.0090.01316.64
8.3.40.0140.00020.34
8.3.30.0110.00320.34
8.3.20.0070.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.250.0080.00018.41
8.2.240.0060.00317.08
8.2.230.0120.00622.58
8.2.220.0160.00037.54
8.2.210.0110.00726.77
8.2.200.0030.00616.50
8.2.190.0060.01316.63
8.2.180.0110.00418.16
8.2.170.0100.00722.96
8.2.160.0130.00722.96
8.2.150.0080.00025.66
8.2.140.0000.00724.66
8.2.130.0000.00726.16
8.2.120.0040.00421.92
8.2.110.0100.00021.12
8.2.100.0070.00417.79
8.2.90.0040.00418.09
8.2.80.0000.00818.78
8.2.70.0050.00579.33
8.2.60.0180.00079.33
8.2.50.0150.00479.33
8.2.40.0140.00579.33
8.2.30.0170.00079.33
8.2.20.0170.00079.33
8.2.10.0130.00579.33
8.2.00.0140.00479.33
8.1.300.0090.00918.30
8.1.290.0060.00330.84
8.1.280.0080.00825.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0060.00323.97
8.1.230.0070.00420.92
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0120.00579.33
8.1.190.0130.00379.33
8.1.180.0190.00079.33
8.1.170.0140.00379.33
8.1.160.0150.00379.33
8.1.150.0130.00379.33
8.1.140.0030.01279.33
8.1.130.0170.00079.33
8.1.120.0130.00379.33
8.1.110.0140.00279.33
8.1.100.0130.00379.33
8.1.90.0140.00379.33
8.1.80.0130.00479.33
8.1.70.0120.00479.33
8.1.60.0130.00479.33
8.1.50.0130.00779.33
8.1.40.0190.00079.33
8.1.30.0130.00579.33
8.1.20.0130.00479.33
8.1.10.0130.00779.33
8.1.00.0130.00479.33
8.0.300.0050.00320.06
8.0.290.0170.00079.33
8.0.280.0140.00379.33
8.0.270.0080.00879.33
8.0.260.0120.00479.33
8.0.250.0080.00879.33
8.0.240.0120.00479.33
8.0.230.0120.00579.33
8.0.220.0160.00079.33
8.0.210.0110.00579.33
8.0.200.0050.01179.33
8.0.190.0150.00279.33
8.0.180.0210.00379.33
8.0.170.0110.00579.33
8.0.160.0120.00479.33
8.0.150.0130.00379.33
8.0.140.0090.00979.33
8.0.130.0060.01279.33
8.0.120.0170.00079.33
8.0.110.0080.00879.33
8.0.100.0150.00279.33
8.0.90.0150.00279.33
8.0.80.0130.00479.33
8.0.70.0110.00679.33
8.0.60.0140.00379.33
8.0.50.0140.00379.33
8.0.30.0130.00379.33
8.0.20.0140.00479.33
8.0.10.0110.00679.33
7.4.330.0040.00579.33
5.5.180.0110.00079.33

preferences:
46.27 ms | 403 KiB | 5 Q