3v4l.org

run code in 300+ PHP versions simultaneously
<?php $starttime = microtime(true); $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;

Abusive script

This script was stopped while abusing our resources

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.4.00.0100.56615.02
7.3.120.0050.48314.79
7.3.110.0070.51314.89
7.3.100.0050.53914.93
7.3.90.0100.46314.78
7.3.80.0070.51815.00
7.3.70.0030.45114.72
7.3.60.0050.58014.89
7.3.50.0020.51214.93
7.3.40.0070.50414.72
7.3.30.0030.51514.81
7.3.20.0030.56116.60
7.3.10.0110.52616.65
7.3.00.0060.44016.49
7.2.250.0070.71814.87
7.2.240.0030.56015.08
7.2.230.0050.48715.20
7.2.220.0030.55514.96
7.2.210.0030.53814.99
7.2.200.0100.55815.15
7.2.190.0070.51915.13
7.2.180.0020.47614.99
7.2.170.0050.46114.87
7.2.160.0020.58214.96
7.2.150.0050.55116.67
7.2.140.0030.45416.79
7.2.130.0040.49016.88
7.2.120.0090.52916.72
7.2.110.0080.52816.85
7.2.100.0080.54216.75
7.2.90.0060.54916.89
7.2.80.0080.53416.87
7.2.70.0080.57916.84
7.2.60.0130.47616.87
7.2.50.0090.45316.82
7.2.40.0070.56016.89
7.2.30.0070.54616.93
7.2.20.0080.55816.81
7.2.10.0070.49816.87
7.2.00.0060.47417.69
7.1.330.0071.23815.74
7.1.320.0031.17415.74
7.1.310.0031.20015.73
7.1.300.0101.30815.85
7.1.290.0071.19715.86
7.1.280.0051.20715.82
7.1.270.0031.27015.85
7.1.260.0051.26015.75
7.1.250.0071.17315.70
7.1.240.0031.43715.87
7.1.230.0031.29715.90
7.1.220.0001.59915.74
7.1.210.0071.50315.50
7.1.200.0031.20515.83
7.1.190.0071.35415.86
7.1.180.0001.53715.97
7.1.170.0071.19415.96
7.1.160.0031.36715.83
7.1.150.0031.20315.68
7.1.140.0031.23515.92
7.1.130.0031.33015.51
7.1.120.0031.53015.59
7.1.110.0071.44515.65
7.1.100.0131.34615.83
7.1.90.0031.44015.80
7.1.80.0001.41015.73
7.1.70.0050.83616.54
7.1.60.0030.82817.62
7.1.50.0070.83816.35
7.1.40.0071.18515.76
7.1.30.0001.35515.93
7.1.20.0071.47915.63
7.1.10.0031.26215.89
7.1.00.0070.83619.03
7.0.330.0071.58715.40
7.0.320.0001.43815.06
7.0.310.0001.50215.50
7.0.300.0031.26515.41
7.0.290.0101.45315.21
7.0.280.0031.44615.46
7.0.270.0071.51315.38
7.0.260.0001.59115.43
7.0.250.0071.20215.19
7.0.240.0031.43815.59
7.0.230.0071.19215.54
7.0.220.0031.49515.41
7.0.210.0001.60015.42
7.0.200.0301.10115.83
7.0.190.0001.46515.25
7.0.180.0031.33115.57
7.0.170.0031.50115.57
7.0.160.0031.60615.47
7.0.150.0001.56015.44
7.0.140.0031.01118.79
7.0.130.0031.22515.55
7.0.120.0031.50515.61
7.0.110.0101.28215.31
7.0.100.0001.62515.40
7.0.90.0031.51815.56
7.0.80.0071.25915.57
7.0.70.2381.00717.62
7.0.60.0030.96117.75
7.0.50.0031.05316.77
7.0.40.0051.00716.79
7.0.30.0171.04116.87
7.0.20.0151.04316.81
7.0.10.0121.04616.84
7.0.00.0031.08516.72
5.6.400.0002.49814.37
5.6.390.0032.49514.43
5.6.380.0032.49514.48
5.6.370.0032.49514.48
5.6.360.0002.49614.31
5.6.350.0002.49914.55
5.6.340.0072.48914.38
5.6.330.0002.49914.41
5.6.320.0002.49514.30
5.6.310.0032.49414.71
5.6.300.0102.48914.29
5.6.290.0072.49214.16
5.6.280.0051.74817.65
5.6.270.0072.49114.38
5.6.260.0062.48514.83
5.6.250.0032.49414.59
5.6.240.0032.49614.61
5.6.230.0072.49214.61
5.6.220.0032.49514.28
5.6.210.0081.74217.37
5.6.200.0071.72416.37
5.6.190.0051.75617.55
5.6.180.0081.74417.44
5.6.170.0181.71517.46
5.6.160.0071.69517.53
5.6.150.0071.74416.23
5.6.140.0031.70216.24
5.6.130.0071.74316.29
5.6.120.0071.71517.88
5.6.110.0081.78717.78
5.6.100.0081.71917.65
5.6.90.0501.72117.76
5.6.80.0051.71817.29
5.6.70.0031.69017.37
5.6.60.0032.49514.54
5.6.50.0002.49914.35
5.6.40.0112.43414.15
5.6.30.0072.47914.19
5.6.20.0032.49514.57
5.6.10.0032.49514.54
5.6.00.0002.49614.44
5.5.380.0002.49814.06
5.5.370.0032.49614.21
5.5.360.0102.48414.53
5.5.350.0021.74217.30
5.5.340.0081.73016.12
5.5.330.0101.71517.16
5.5.320.0051.79917.24
5.5.310.0171.76517.25
5.5.300.0001.72716.16
5.5.290.0051.73816.27
5.5.280.0071.81117.66
5.5.270.0031.73317.69
5.5.260.0081.79617.65
5.5.250.0051.76817.55
5.5.240.0081.85017.22
5.5.230.0032.49614.11
5.5.220.0002.49814.46
5.5.210.0072.48914.30
5.5.200.0002.49814.25
5.5.190.0072.49114.48
5.5.180.0032.49614.34
5.5.170.0072.49214.53
5.5.160.0102.48714.28
5.5.150.0102.48914.28
5.5.140.0102.48514.09
5.5.130.0072.49214.49
5.5.120.0032.49614.42
5.5.110.0032.49614.61
5.5.100.0002.49613.98
5.5.90.0002.49914.24
5.5.80.0032.49414.61
5.5.70.0072.49014.11
5.5.60.0002.49814.40
5.5.50.0072.49214.09
5.5.40.0032.49514.19
5.5.30.0072.49314.48
5.5.20.0132.48414.17
5.5.10.0032.49614.45
5.5.00.0002.49314.10
5.4.450.0781.70415.80
5.4.440.0901.70715.85
5.4.430.0751.70915.67
5.4.420.0751.70415.76
5.4.410.0821.70415.69
5.4.400.0921.72115.45
5.4.390.0881.81015.50
5.4.380.0951.71315.63
5.4.370.0851.71415.66
5.4.360.0851.71715.44
5.4.350.1151.72115.64
5.4.340.1171.70815.60
5.4.330.0002.49912.11
5.4.320.1001.71715.59
5.4.310.0931.82715.60
5.4.300.0871.71115.62
5.4.290.0081.72015.68
5.4.280.0031.73615.62
5.4.270.0021.74715.66
5.4.260.0451.74315.51
5.4.250.0981.74315.49
5.4.240.0931.80715.58
5.4.230.0971.72115.62
5.4.220.0901.79115.67
5.4.210.0031.75115.63
5.4.200.0031.74615.60
5.4.190.0031.76115.63
5.4.180.0451.78015.43
5.4.170.0981.80315.59
5.4.160.0921.73415.58
5.4.150.0971.85415.50
5.4.140.0951.72314.24
5.4.130.1021.88314.19
5.4.120.0851.70614.18
5.4.110.0971.71514.29
5.4.100.0981.85914.26
5.4.90.0871.72214.29
5.4.80.0971.71514.25
5.4.70.0951.74314.24
5.4.60.0951.72614.19
5.4.50.0921.87914.28
5.4.40.0971.70614.21
5.4.30.0971.71314.23
5.4.20.1021.88814.23
5.4.10.0951.72114.24
5.4.00.0821.76113.87
5.3.290.1870.03314.54
5.3.280.1870.04014.45
5.3.270.1870.04714.63
5.3.260.1630.04314.59
5.3.250.1800.03714.45
5.3.240.1930.04014.54
5.3.230.1700.03714.54
5.3.220.1600.03714.42
5.3.210.1900.04714.44
5.3.200.1900.04014.44
5.3.190.1930.04314.55
5.3.180.1870.03014.55
5.3.170.1870.04314.52
5.3.160.1830.04314.61
5.3.150.1730.03014.44
5.3.140.1500.04314.50
5.3.130.1630.04014.58
5.3.120.1570.03714.59
5.3.110.1600.04314.50
5.3.100.1570.03313.88
5.3.90.1770.02313.98
5.3.80.1670.03713.79
5.3.70.1600.04013.81
5.3.60.1630.03713.80
5.3.50.1730.03313.87
5.3.40.1470.04013.74
5.3.30.2000.04013.69
5.3.20.1530.02713.64
5.3.10.1700.03013.53
5.3.00.1670.03713.64
5.2.170.1530.02710.99
5.2.160.1600.03011.19
5.2.150.1230.03010.99
5.2.140.1400.02710.98
5.2.130.1400.02711.11
5.2.120.1470.02710.96
5.2.110.1330.03310.98
5.2.100.1330.03010.96
5.2.90.1300.02710.94
5.2.80.1500.02711.04
5.2.70.1370.02710.93
5.2.60.1330.02310.90
5.2.50.1000.03011.06
5.2.40.1170.02711.00
5.2.30.1130.03010.82
5.2.20.0870.03011.12
5.2.10.1100.03011.02
5.2.00.1130.02710.66
5.1.60.1100.0239.89
5.1.50.1270.0279.97
5.1.40.1230.02010.05
5.1.30.1170.03010.24
5.1.20.1170.02310.40
5.1.10.1230.02010.00
5.1.00.1130.03010.05
5.0.50.0530.0238.59
5.0.40.0700.0208.41
5.0.30.0900.0208.19
5.0.20.0600.0278.13
5.0.10.0600.0178.05
5.0.00.0700.0208.27
4.4.90.0770.0237.79
4.4.80.0600.0177.79
4.4.70.0530.0177.79
4.4.60.0530.0177.79
4.4.50.0630.0207.79
4.4.40.0570.0237.79
4.4.30.0600.0177.79
4.4.20.0630.0237.79
4.4.10.0570.0137.79
4.4.00.0570.0237.79
4.3.110.0570.0137.79
4.3.100.0600.0137.79
4.3.90.0470.0237.79
4.3.80.0730.0337.79
4.3.70.0570.0177.79
4.3.60.0770.0137.79
4.3.50.0700.0137.79
4.3.40.0700.0337.79
4.3.30.0270.0177.79
4.3.20.0270.0207.79
4.3.10.0370.0337.79
4.3.00.0270.0177.79

preferences:
44.85 ms | 400 KiB | 5 Q