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); for ($c=0;$c<1000;$c++) { for ($i=0;$i<count($array);$i++) { for ($y=0;$y<count($array)-1;$y++) { if ($array[$y+1] < $array[$y]) { $t = $array[$y]; $array[$y] = $array[$y+1]; $array[$y+1] = $t; } } } } print_r($array); 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.4.10.0100.01415.00
7.4.00.0060.01815.08
7.3.130.0050.02014.95
7.3.120.0090.01414.71
7.3.110.0070.01914.81
7.3.100.0060.01214.79
7.3.90.0060.01214.96
7.3.80.0050.01514.86
7.3.70.0050.01514.59
7.3.60.0050.01414.72
7.3.50.0060.01714.76
7.3.40.0060.01314.67
7.3.30.0070.01414.87
7.3.20.0060.01316.56
7.3.10.0050.01616.67
7.3.00.0030.01516.83
7.2.260.0060.02015.13
7.2.250.0050.01715.04
7.2.240.0080.01415.09
7.2.230.0090.01214.88
7.2.220.0030.01815.14
7.2.210.0060.01714.92
7.2.200.0070.01514.85
7.2.190.0070.01714.90
7.2.180.0050.01714.99
7.2.170.0070.01115.03
7.2.160.0050.01614.98
7.2.150.0030.01316.96
7.2.140.0080.01316.99
7.2.130.0000.01717.02
7.2.120.0060.01616.80
7.2.110.0080.01217.08
7.2.100.0100.01017.04
7.2.90.0080.00916.97
7.2.80.0030.01617.02
7.2.70.0080.01116.78
7.2.60.0060.01517.03
7.2.50.0070.01416.93
7.2.40.0070.01417.05
7.2.30.0050.01416.87
7.2.20.0040.01516.96
7.2.10.0070.01416.87
7.2.00.0060.01517.61
7.1.330.0040.03316.01
7.1.320.0030.02815.90
7.1.310.0080.03015.70
7.1.300.0120.02615.74
7.1.290.0060.02815.90
7.1.280.0020.03015.84
7.1.270.0050.03315.71
7.1.260.0050.02715.90
7.1.250.0080.02715.69
7.1.240.0060.02815.88
7.1.230.0070.02515.78
7.1.220.0050.02615.75
7.1.210.0030.02815.93
7.1.200.0020.03015.79
7.1.190.0030.03015.90
7.1.180.0070.03015.73
7.1.170.0070.02515.94
7.1.160.0070.02815.76
7.1.150.0020.03015.85
7.1.140.0030.02915.81
7.1.130.0060.02515.90
7.1.120.0020.03515.93
7.1.110.0050.02615.97
7.1.100.0020.02915.90
7.1.90.0100.02415.81
7.1.80.0030.02715.94
7.1.70.0050.02516.24
7.1.60.0060.02417.06
7.1.50.0060.02616.08
7.1.40.0020.03115.71
7.1.30.0080.02315.98
7.1.20.0060.02815.77
7.1.10.0080.02515.84
7.1.00.0020.04717.97
7.0.330.0070.02615.50
7.0.320.0070.02515.45
7.0.310.0030.03015.31
7.0.300.0070.02315.23
7.0.290.0030.02815.38
7.0.280.0100.02315.26
7.0.270.0030.03215.31
7.0.260.0030.02815.42
7.0.250.0050.02715.43
7.0.240.0050.02715.33
7.0.230.0020.02915.46
7.0.220.0080.02415.43
7.0.210.0070.02515.46
7.0.200.0040.02416.00
7.0.190.0030.03115.34
7.0.180.0050.02715.46
7.0.170.0030.02515.56
7.0.160.0110.02415.53
7.0.150.0060.02815.36
7.0.140.0040.04517.68
7.0.130.0070.02315.42
7.0.120.0060.02815.43
7.0.110.0230.04716.95
7.0.100.0280.04517.02
7.0.90.0170.04716.91
7.0.80.0210.04416.96
7.0.70.0260.04617.05
7.0.60.0210.04416.91
7.0.50.0240.04116.99
7.0.40.0060.04915.64
7.0.30.0030.04715.70
7.0.20.0100.03515.77
7.0.10.0030.05015.70
7.0.00.0040.05215.63
5.6.400.0050.06014.37
5.6.390.0080.05914.27
5.6.380.0030.05714.42
5.6.370.0060.05314.59
5.6.360.0050.05514.78
5.6.350.0050.05414.55
5.6.340.0060.05514.56
5.6.330.0080.06014.70
5.6.320.0100.04814.48
5.6.310.0050.05614.45
5.6.300.0050.05214.24
5.6.290.0000.06014.41
5.6.280.0060.07216.62
5.6.270.0020.06114.48
5.6.260.0090.07116.55
5.6.250.0030.07816.55
5.6.240.0060.05416.54
5.6.230.0060.05616.45
5.6.220.0060.07116.50
5.6.210.0040.07116.42
5.6.200.0040.07416.57
5.6.190.0060.06016.53
5.6.180.0040.06116.42
5.6.170.0040.07016.46
5.6.160.0070.07216.46
5.6.150.0060.07316.49
5.6.140.0100.07316.46
5.6.130.0040.07416.55
5.6.120.0070.08016.57
5.6.110.0080.06616.54
5.6.100.0040.07116.44
5.6.90.0050.07516.38
5.6.80.0020.07316.23
5.6.70.0110.06116.35
5.6.60.0040.07716.31
5.6.50.0100.07116.18
5.6.40.0040.07116.33
5.6.30.0060.07216.23
5.6.20.0030.07816.23
5.6.10.0080.07016.28
5.6.00.0100.06516.10
5.5.380.0080.07015.47
5.5.370.0020.08015.29
5.5.360.0070.06415.58
5.5.350.0040.07215.54
5.5.340.0010.05915.70
5.5.330.0040.06915.53
5.5.320.0080.06815.70
5.5.310.0070.06415.60
5.5.300.0050.07515.61
5.5.290.0040.07315.57
5.5.280.0070.08515.62
5.5.270.0070.07315.69
5.5.260.0060.07315.52
5.5.250.0060.06615.51
5.5.240.0060.07515.43
5.5.230.0070.07115.35
5.5.220.0080.06915.35
5.5.210.0060.07115.50
5.5.200.0080.07215.44
5.5.190.0040.07215.47
5.5.180.0060.07615.30
5.5.170.0030.05814.47
5.5.160.0020.07115.22
5.5.150.0030.05815.38
5.5.140.0030.06715.43
5.5.130.0020.05915.27
5.5.120.0040.05515.33
5.5.110.0060.05415.33
5.5.100.0050.06315.33
5.5.90.0040.05615.43
5.5.80.0070.07215.19
5.5.70.0040.06915.33
5.5.60.0080.06215.47
5.5.50.0040.05915.27
5.5.40.0050.05715.37
5.5.30.0080.06415.35
5.5.20.0050.05815.25
5.5.10.0040.05415.39
5.5.00.0090.05715.22
5.4.450.0040.07315.10
5.4.440.0060.05615.17
5.4.430.0090.06915.20
5.4.420.0070.07215.09
5.4.410.0080.06815.16
5.4.400.0080.06814.99
5.4.390.0030.07015.01
5.4.380.0040.07215.04
5.4.370.0070.06615.05
5.4.360.0010.07015.05
5.4.350.0030.07415.07
5.4.340.0070.06915.00
5.4.330.0070.05312.99
5.4.320.0080.06815.00
5.4.310.0070.06814.97
5.4.300.0030.05814.99
5.4.290.0030.05715.09
5.4.280.0070.05415.02
5.4.270.0030.05815.05
5.4.260.0020.06415.07
5.4.250.0070.07014.99
5.4.240.0030.07115.04
5.4.230.0030.06215.10
5.4.220.0070.06514.98
5.4.210.0020.06714.99
5.4.200.0040.05815.08
5.4.190.0070.07615.07
5.4.180.0050.06415.05
5.4.170.0010.06614.97
5.4.160.0030.05714.99
5.4.150.0090.06215.06
5.4.140.0040.06114.17
5.4.130.0040.06614.18
5.4.120.0020.05714.18
5.4.110.0020.05814.18
5.4.100.0090.06414.17
5.4.90.0010.05914.19
5.4.80.0040.05814.15
5.4.70.0060.07014.14
5.4.60.0010.07314.18
5.4.50.0060.05614.16
5.4.40.0030.07614.13
5.4.30.0050.07114.17
5.4.20.0030.07214.12
5.4.10.0050.07414.14
5.4.00.0020.07513.91
5.3.290.0030.11014.69
5.3.280.0000.12014.72
5.3.270.0000.08714.73
5.3.260.0000.09714.56
5.3.250.0070.05714.73
5.3.240.0030.06014.65
5.3.230.0030.06014.68
5.3.220.0130.04714.57
5.3.210.0130.06714.64
5.3.200.0070.06014.56
5.3.190.0100.05014.59
5.3.180.0100.07014.64
5.3.170.0100.06714.58
5.3.160.0000.06314.57
5.3.150.0030.10714.69
5.3.140.0100.09714.59
5.3.130.0030.11714.55
5.3.120.0100.11314.57
5.3.110.0030.11014.64
5.3.100.0070.11714.12
5.3.90.0100.08714.00
5.3.80.0030.09014.14
5.3.70.0030.08714.10
5.3.60.0100.11014.07
5.3.50.0000.11314.16
5.3.40.0070.11313.96
5.3.30.0130.10013.94
5.3.20.0030.10313.69
5.3.10.0070.10713.52
5.3.00.0100.10313.65
5.2.170.0000.10711.31
5.2.160.0070.10711.31
5.2.150.0070.08711.31
5.2.140.0070.11311.31
5.2.130.0070.11011.31
5.2.120.0100.10311.31
5.2.110.0100.08311.31
5.2.100.0030.11311.31
5.2.90.0070.11311.31
5.2.80.0000.11711.31
5.2.70.0100.10311.31
5.2.60.0000.11311.31
5.2.50.0030.11011.31
5.2.40.0070.09711.31
5.2.30.0030.06711.31
5.2.20.0070.10711.31
5.2.10.0030.10711.31
5.2.00.0100.09311.31
5.1.60.0070.09311.31
5.1.50.0000.09711.31
5.1.40.0000.11011.31
5.1.30.0070.10011.31
5.1.20.0070.10311.31
5.1.10.0100.09711.31
5.1.00.0030.09311.31
5.0.50.0070.13711.31
5.0.40.0070.14011.31
5.0.30.0000.15711.31
5.0.20.0030.12311.31
5.0.10.0000.13311.31
5.0.00.0070.14311.31
4.4.90.0070.11311.31
4.4.80.0000.12011.31
4.4.70.0000.13011.31
4.4.60.0070.07711.31
4.4.50.0030.13311.31
4.4.40.0030.12711.31
4.4.30.0000.13311.31
4.4.20.0070.12311.31
4.4.10.0030.12011.31
4.4.00.0030.14311.31
4.3.110.0070.12311.31
4.3.100.0030.10311.31
4.3.90.0000.11711.31
4.3.80.0000.13711.31
4.3.70.0170.11711.31
4.3.60.0030.13011.31
4.3.50.0030.12311.31
4.3.40.0000.11711.31
4.3.30.0000.12711.31
4.3.20.0000.13011.31
4.3.10.0030.12311.31
4.3.00.0000.12011.31

preferences:
30.48 ms | 401 KiB | 5 Q