3v4l.org

run code in 300+ PHP versions simultaneously
<?php $starttime = microtime(true); $array = \SplFixedStorage::fromArray([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.2.00.0080.01119.20
7.1.70.0000.00717.01
7.1.60.0100.01319.32
7.1.50.0030.02216.79
7.1.00.0070.07322.30
7.0.200.0070.00316.68
7.0.140.0030.07022.04
7.0.60.0100.04720.03
7.0.50.0100.05717.80
7.0.40.0100.05720.08
7.0.30.0370.03720.18
7.0.20.0400.07320.04
7.0.10.0270.07020.04
7.0.00.0070.04020.08
5.6.280.0000.07721.12
5.6.210.0100.07020.76
5.6.200.0100.05018.14
5.6.190.0070.05720.57
5.6.180.0330.07020.57
5.6.170.0230.08320.52
5.6.160.0070.04320.45
5.6.150.0030.04018.12
5.6.140.0130.07018.08
5.6.130.0100.08318.11
5.6.120.0170.07021.03
5.6.110.0170.07720.97
5.6.100.0170.06020.88
5.6.90.0170.06720.97
5.6.80.0200.05020.38
5.6.70.3500.03320.41
5.5.350.0070.07020.38
5.5.340.0030.05318.01
5.5.330.0030.07720.15
5.5.320.0370.07720.41
5.5.310.0330.04320.50
5.5.300.0030.04717.98
5.5.290.0070.07018.00
5.5.280.0070.07020.84
5.5.270.0030.09020.79
5.5.260.0030.08720.84
5.5.250.0070.07320.77
5.5.240.2270.05720.18
5.4.450.0370.05719.34
5.4.440.0800.05019.43
5.4.430.0830.05319.45
5.4.420.0770.06019.32
5.4.410.0500.06718.97
5.4.400.0200.05019.16
5.4.390.0230.05019.15
5.4.380.0300.06018.59
5.4.370.0300.05318.52
5.4.360.0470.04318.49
5.4.350.0430.08318.59
5.4.340.0270.06718.72
5.4.320.0060.03512.46
5.4.310.0040.03912.45
5.4.300.0050.03712.45
5.4.290.0020.04112.45
5.4.280.0090.03412.35
5.4.270.0080.03412.35
5.4.260.0040.04012.35
5.4.250.0050.03912.35
5.4.240.0070.03612.35
5.4.230.0040.04012.34
5.4.220.0060.03612.34
5.4.210.0030.03812.34
5.4.200.0060.04312.34
5.4.190.0060.03612.34
5.4.180.0040.03912.34
5.4.170.0070.03412.35
5.4.160.0040.03712.34
5.4.150.0060.04212.34
5.4.140.0070.03712.03
5.4.130.0060.03512.02
5.4.120.0050.03711.97
5.4.110.0070.03411.97
5.4.100.0060.04111.96
5.4.90.0050.03811.97
5.4.80.0070.03911.96
5.4.70.0050.03611.96
5.4.60.0070.03411.96
5.4.50.0070.03311.96
5.4.40.0050.03411.95
5.4.30.0030.03711.95
5.4.20.0090.03211.95
5.4.10.0050.03511.95
5.4.00.0060.03511.44
5.3.290.0030.04312.80
5.3.280.0080.03712.71
5.3.270.0050.04012.73
5.3.260.0070.03812.72
5.3.250.0040.03912.72
5.3.240.0030.04012.72
5.3.230.0080.03712.71
5.3.220.0060.03812.68
5.3.210.0040.04312.68
5.3.200.0040.03912.68
5.3.190.0060.03712.68
5.3.180.0050.03912.67
5.3.170.0070.03612.67
5.3.160.0070.03912.68
5.3.150.0030.04112.67
5.3.140.0060.04512.66
5.3.130.0050.04212.66
5.3.120.0070.04012.66
5.3.110.0050.04112.66
5.3.100.0080.03912.12
5.3.90.0060.05212.09
5.3.80.0090.04712.07
5.3.70.0060.03912.07
5.3.60.0100.03512.06
5.3.50.0070.03812.00
5.3.40.0060.03812.00
5.3.30.0060.03511.96
5.3.20.0060.03611.74
5.3.10.0070.03411.71
5.3.00.0070.03511.70
5.2.170.0040.0449.18
5.2.160.0050.0409.18
5.2.150.0030.0339.18
5.2.140.0060.0309.18
5.2.130.0040.0309.14
5.2.120.0040.0319.14
5.2.110.0030.0329.14
5.2.100.0040.0309.14
5.2.90.0060.0299.14
5.2.80.0060.0309.14
5.2.70.0030.0339.14
5.2.60.0040.0329.09
5.2.50.0030.0339.06
5.2.40.0060.0319.04
5.2.30.0080.0399.02
5.2.20.0050.0329.00
5.2.10.0060.0308.93
5.2.00.0070.0298.79
5.1.60.0020.0278.07
5.1.50.0060.0308.07
5.1.40.0090.0308.05
5.1.30.0090.0228.40
5.1.20.0070.0258.41
5.1.10.0050.0278.14
5.1.00.0070.0358.14
5.0.50.0040.0206.62
5.0.40.0030.0206.48
5.0.30.0050.0306.29
5.0.20.0020.0206.27
5.0.10.0080.0146.24
5.0.00.0030.0306.23
4.4.90.0010.0174.78
4.4.80.0020.0164.75
4.4.70.0010.0174.75
4.4.60.0010.0174.76
4.4.50.0020.0164.77
4.4.40.0020.0264.71
4.4.30.0020.0164.76
4.4.20.0040.0144.85
4.4.10.0040.0154.85
4.4.00.0000.0284.76
4.3.110.0020.0164.67
4.3.100.0030.0154.66
4.3.90.0020.0154.64
4.3.80.0030.0244.58
4.3.70.0030.0144.63
4.3.60.0040.0134.63
4.3.50.0030.0154.63
4.3.40.0020.0264.54
4.3.30.0020.0193.29
4.3.20.0210.0163.27
4.3.10.0020.0163.22
4.3.00.0000.0277.56

preferences:
34.81 ms | 401 KiB | 5 Q