3v4l.org

run code in 300+ PHP versions simultaneously
<?php $starttime = microtime(true); $array = array(3,4,1,3,5,1,92,2,4124,424,52,12); $array_count = count($array); for ($c=0;$c<100000;$c++) { for ($i=0;$i<$array_count;$i++) { for ($y=0;$y<$array_count-1;$y++) { if ($array[$y+1] < $array[$y]) { $t = $array[$y]; $array[$y] = $array[$y+1]; $array[$y+1] = $t; } } } } echo microtime(true) - $starttime;

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)
7.1.70.0000.42317.07
7.1.60.0000.41517.38
7.1.50.0030.38916.98
7.1.40.0030.39616.63
7.1.30.0100.39716.71
7.1.20.0030.41216.97
7.1.10.0000.44116.70
7.1.00.0100.38916.54
7.0.200.0070.41216.68
7.0.190.0930.46916.84
7.0.180.0030.42616.26
7.0.170.0000.48016.24
7.0.160.0000.40016.48
7.0.150.0100.47516.32
7.0.140.0100.47016.37
7.0.130.0000.41816.82
7.0.120.0000.43616.83
7.0.110.0000.43116.53
7.0.100.0030.49916.35
7.0.90.0070.46716.36
7.0.80.0000.48116.40
7.0.70.0100.44316.37
7.0.60.0030.45416.35
7.0.50.0030.43616.48
7.0.40.0030.45115.30
7.0.30.0000.42815.30
7.0.20.0000.48815.30
7.0.10.0000.44215.30
7.0.00.0030.53015.30
5.6.300.0031.09820.57
5.6.290.0071.08820.67
5.6.280.0001.05521.03
5.6.270.0031.08020.95
5.6.260.0001.03621.02
5.6.250.0701.09420.86
5.6.240.0130.98920.91
5.6.230.0201.05320.96
5.6.220.0130.98120.78
5.6.210.0001.06120.97
5.6.200.0031.03820.99
5.6.190.0031.05621.00
5.6.180.0070.94820.82
5.6.170.0101.02320.82
5.6.160.0100.98220.98
5.6.150.0001.07520.82
5.6.140.0101.09521.01
5.6.130.0071.00420.81
5.6.120.0071.08020.97
5.6.110.0131.10620.81
5.6.100.0031.04320.89
5.6.90.0070.97520.93
5.6.80.0001.02720.38
5.6.70.0030.99420.17
5.6.60.0071.04220.39
5.6.50.0071.09120.38
5.6.40.0101.06720.38
5.6.30.0100.99320.27
5.6.20.0031.02320.21
5.6.10.0101.16520.30
5.6.00.0101.01820.29
5.5.380.0030.99717.55
5.5.370.0030.98617.44
5.5.360.0030.96117.50
5.5.350.0001.11317.46
5.5.340.0071.08017.97
5.5.330.0101.08917.98
5.5.320.0071.02817.97
5.5.310.0031.04418.00
5.5.300.0031.03818.00
5.5.290.0001.03717.94
5.5.280.0071.04917.82
5.5.270.0031.11717.97
5.5.260.0031.04217.70
5.5.250.0071.04017.63
5.5.240.0031.02317.33
5.5.230.0030.98117.46
5.5.220.0031.06817.19
5.5.210.0001.04417.32
5.5.200.0000.99517.44
5.5.190.0031.01217.39
5.5.180.0100.98117.34
5.5.160.0030.95117.35
5.5.150.0070.97217.39
5.5.140.0030.96117.16
5.5.130.0030.96917.34
5.5.120.0070.99917.34
5.5.110.0000.99417.15
5.5.100.0470.92717.25
5.5.90.0030.97817.06
5.5.80.0070.98917.23
5.5.70.0031.11817.18
5.5.60.0031.05317.22
5.5.50.0001.02017.23
5.5.40.0000.97117.22
5.5.30.0071.04417.23
5.5.20.0001.07817.05
5.5.10.0071.06617.23
5.5.00.0071.01017.25
5.4.450.1071.12419.27
5.4.440.0031.01619.46
5.4.430.0030.99019.26
5.4.420.0071.00319.36
5.4.410.0000.98419.32
5.4.400.0031.01319.00
5.4.390.0030.98219.02
5.4.380.0030.95519.04
5.4.370.0031.08719.04
5.4.360.0071.02218.89
5.4.350.0070.96418.94
5.4.340.0100.97318.97
5.4.320.0001.04718.83
5.4.310.0031.06219.09
5.4.300.0071.03418.80
5.4.290.0131.01618.83
5.4.280.0131.02518.94
5.4.270.0030.94619.01
5.4.260.0130.95319.03
5.4.250.0071.10018.82
5.4.240.0100.98118.83
5.4.230.0071.06318.94
5.4.220.0031.10118.83
5.4.210.0101.02218.98
5.4.200.0031.05519.02
5.4.190.0130.97619.08
5.4.180.0031.13218.81
5.4.170.0001.02418.93
5.4.160.0071.05318.95
5.4.150.0031.00318.87
5.4.140.0071.16516.55
5.4.130.0030.99916.26
5.4.120.0030.98516.38
5.4.110.0070.97916.56
5.4.100.0071.00616.52
5.4.90.0030.98916.65
5.4.80.0000.98216.54
5.4.70.0070.99516.31
5.4.60.0031.07616.63
5.4.50.0100.99216.57
5.4.40.0100.98516.58
5.4.30.0030.97216.50
5.4.20.0001.00916.49
5.4.10.0001.04216.59
5.4.00.0031.18615.70

preferences:
33.98 ms | 401 KiB | 5 Q