3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$arr = array(1,2,3,4,5,6,7,8,9,0); $arr = array(1,2,3,4,5,6,7, 8); $i = 0; $links_count = 2; $s = '<ul>'; while ($item = current($arr)) { $s .= !($i % $links_count) ? "<li>\n" : ""; $s .= "<a href='#'>$item</a>\n"; $s .= !(($i+1) % $links_count) ? "</li>\n" : ""; $i++; next($arr); } $s .= ($i % $links_count) ? "</li></ul>\n" : "</ul>"; echo $s;

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.40.0180.00418.84
8.3.30.0100.00318.67
8.3.20.0040.00418.68
8.3.10.0060.00320.53
8.3.00.0090.00019.25
8.2.170.0100.00722.96
8.2.160.0040.01218.91
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00420.45
8.2.110.0000.01021.18
8.2.100.0000.01119.70
8.2.90.0050.00319.21
8.2.80.0080.00017.97
8.2.70.0000.00817.75
8.2.60.0080.00018.05
8.2.50.0040.00419.53
8.2.40.0040.00720.08
8.2.30.0000.00818.05
8.2.20.0080.00317.63
8.2.10.0050.00217.79
8.2.00.0080.00017.82
8.1.270.0030.00523.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00422.06
8.1.230.0080.00417.42
8.1.220.0040.00417.77
8.1.210.0040.00418.77
8.1.200.0060.00317.25
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0090.00018.55
8.1.160.0000.00818.90
8.1.150.0070.00018.58
8.1.140.0040.00417.41
8.1.130.0000.00717.47
8.1.120.0060.00317.56
8.1.110.0000.00817.36
8.1.100.0000.00817.56
8.1.90.0090.00017.50
8.1.80.0030.00317.45
8.1.70.0030.00317.36
8.1.60.0040.00717.58
8.1.50.0040.00417.47
8.1.40.0040.00417.43
8.1.30.0000.00817.65
8.1.20.0060.00317.73
8.1.10.0040.00417.52
8.1.00.0000.00817.45
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0070.00018.39
8.0.270.0070.00017.28
8.0.260.0000.00716.76
8.0.250.0000.00716.88
8.0.240.0070.00016.95
8.0.230.0000.00716.96
8.0.220.0000.00716.90
8.0.210.0040.00416.87
8.0.200.0080.00016.97
8.0.190.0030.00616.93
8.0.180.0040.00416.88
8.0.170.0030.00616.77
8.0.160.0000.00716.99
8.0.150.0040.00416.92
8.0.140.0040.00416.75
8.0.130.0030.00313.36
8.0.120.0080.00016.80
8.0.110.0040.00416.72
8.0.100.0030.00616.86
8.0.90.0000.00816.96
8.0.80.0140.00616.96
8.0.70.0040.00416.88
8.0.60.0040.00416.78
8.0.50.0000.00816.77
8.0.30.0170.00317.23
8.0.20.0140.00517.19
8.0.10.0070.00016.91
8.0.00.0120.00716.63
7.4.330.0020.00213.01
7.4.320.0000.00616.52
7.4.300.0040.00416.43
7.4.290.0070.00016.54
7.4.280.0090.00016.63
7.4.270.0000.00716.46
7.4.260.0050.00013.30
7.4.250.0060.00316.58
7.4.240.0030.00316.55
7.4.230.0030.00316.73
7.4.220.0090.00916.54
7.4.210.0100.01016.58
7.4.200.0030.00316.36
7.4.190.0030.00316.36
7.4.160.0130.00316.32
7.4.150.0100.01016.54
7.4.140.0100.00716.30
7.4.130.0100.01316.34
7.4.120.0100.00716.45
7.4.110.0070.01416.49
7.4.100.0210.00616.59
7.4.90.0120.00616.48
7.4.80.0120.00419.39
7.4.70.0140.00316.71
7.4.60.0130.00316.23
7.4.50.0030.00316.59
7.4.40.0100.00616.30
7.4.30.0130.00316.41
7.4.00.0080.00914.89
7.3.330.0060.00013.24
7.3.320.0060.00013.21
7.3.310.0000.00716.32
7.3.300.0030.00316.34
7.3.290.0030.01016.37
7.3.280.0120.00616.30
7.3.270.0100.00716.73
7.3.260.0160.00316.44
7.3.250.0110.00816.37
7.3.240.0130.00716.44
7.3.230.0090.00916.52
7.3.210.0100.01016.53
7.3.200.0090.01216.49
7.3.190.0150.00316.34
7.3.180.0070.01116.34
7.3.170.0000.01616.42
7.3.160.0030.01316.52
7.3.120.0070.00914.71
7.3.110.0090.00914.88
7.3.100.0060.01315.07
7.3.90.0030.01514.60
7.3.80.0080.00814.96
7.3.70.0070.00714.81
7.3.60.0000.01614.51
7.3.50.0130.00314.89
7.3.40.0040.01114.77
7.3.30.0130.00014.79
7.3.20.0030.01416.67
7.3.10.0070.00716.81
7.3.00.0040.01216.64
7.2.330.0100.00616.70
7.2.320.0060.01216.51
7.2.310.0130.00416.66
7.2.300.0150.00316.44
7.2.290.0110.00916.48
7.2.250.0100.00314.99
7.2.240.0040.01815.05
7.2.230.0120.00615.16
7.2.220.0070.00315.01
7.2.210.0040.01215.03
7.2.200.0070.00715.12
7.2.190.0060.01014.81
7.2.180.0100.00715.02
7.2.170.0000.01515.07
7.2.80.0060.00616.69
7.1.330.0100.00315.93
7.1.320.0050.00515.97
7.1.310.0100.01016.16
7.1.300.0070.01015.84
7.1.290.0000.01515.45
7.1.280.0030.01015.86
7.1.270.0130.00315.84
7.1.260.0110.00415.87
7.1.200.0060.00615.93
7.1.70.0030.00617.10
7.1.60.0030.00716.79
7.1.50.0030.01416.91
7.1.00.0000.08022.40
7.0.200.0060.01016.95
7.0.140.0100.06722.09
7.0.120.0100.06322.26
7.0.60.0230.07319.92
7.0.50.0070.04317.87
7.0.40.0030.04719.98
7.0.30.0200.04020.21
7.0.20.0170.04020.30
7.0.10.0330.07720.23
7.0.00.0030.06020.02
5.6.280.0070.06720.98
5.6.210.0100.08020.51
5.6.200.0070.06718.12
5.6.190.0000.04720.60
5.6.180.0170.04320.46
5.6.170.0300.07720.33
5.6.160.0070.08020.54
5.6.150.0070.03718.20
5.6.140.0030.04318.22
5.6.130.0100.06718.14
5.6.120.0000.09021.01
5.6.110.0130.03020.99
5.6.100.0000.08721.00
5.6.90.0130.05720.99
5.6.80.0000.05020.28
5.6.70.0270.05720.39
5.5.350.0270.05720.32
5.5.340.0000.05017.92
5.5.330.0070.05720.09
5.5.320.0200.04320.40
5.5.310.0230.07020.20
5.5.300.0100.04717.98
5.5.290.0030.08317.97
5.5.280.0100.07720.88
5.5.270.0100.07720.75
5.5.260.0100.03720.77
5.5.250.0100.04020.66
5.5.240.0070.08020.25
5.4.450.0030.08319.41
5.4.440.0030.08719.50
5.4.430.0070.04319.40
5.4.420.0000.04319.13
5.4.410.0100.07019.00
5.4.400.0070.03718.79
5.4.390.0030.05018.91
5.4.380.0130.07019.18
5.4.370.0030.07319.14
5.4.360.0130.07019.08
5.4.350.0070.04318.79
5.4.340.0100.07019.18
5.4.320.0030.04019.07
5.4.310.0100.07019.14
5.4.300.0170.06318.80
5.4.290.0070.04719.07
5.4.280.0030.04719.11
5.4.270.0030.03719.15
5.4.260.0070.03319.18
5.4.250.0100.05318.80
5.4.240.0030.04019.15
5.4.230.0030.07719.14
5.4.220.0130.05318.91
5.4.210.0030.07319.13
5.4.200.0070.03719.16
5.4.190.0100.04319.13
5.4.180.0100.07319.11
5.4.170.0000.04719.18
5.4.160.0030.07019.05
5.4.150.0100.07318.90
5.4.140.0130.06016.25
5.4.130.0030.07316.37
5.4.120.0070.07016.37
5.4.110.0030.04016.34
5.4.100.0100.07316.39
5.4.90.0030.04716.41
5.4.80.0070.07016.27
5.4.70.0100.05016.39
5.4.60.0000.04016.22
5.4.50.0000.04716.31
5.4.40.0070.07316.34
5.4.30.0170.07016.12
5.4.20.0030.07716.20
5.4.10.0000.05016.38
5.4.00.0070.03715.70
5.3.290.0130.06314.59
5.3.280.0030.04014.38
5.3.270.0100.08314.53
5.3.260.0170.06714.56
5.3.250.0030.08014.54
5.3.240.0000.08014.54
5.3.230.0070.07014.50
5.3.220.0100.07014.39
5.3.210.0070.06714.49
5.3.200.0130.06314.54
5.3.190.0070.04014.39
5.3.180.0070.07314.52
5.3.170.0030.07314.35
5.3.160.0000.04014.35
5.3.150.0100.07714.49
5.3.140.0130.06714.43
5.3.130.0000.08014.47
5.3.120.0070.08314.50
5.3.110.0100.07314.56
5.3.100.0070.05713.82
5.3.90.0030.04313.95
5.3.80.0000.04713.98
5.3.70.0130.02713.95
5.3.60.0030.03713.84
5.3.50.0030.04013.86
5.3.40.0070.04313.76
5.3.30.0200.05014.00
5.3.20.0100.06713.71
5.3.10.0030.04313.59
5.3.00.0070.03313.61
5.2.170.0070.06011.09
5.2.160.0030.05711.04
5.2.150.0030.03711.29
5.2.140.0100.05010.96
5.2.130.0000.06310.99
5.2.120.0030.06310.94
5.2.110.0130.02011.18
5.2.100.0030.03711.03
5.2.90.0000.03311.08
5.2.80.0000.06711.08
5.2.70.0070.06011.04
5.2.60.0130.03011.00
5.2.50.0030.03310.84
5.2.40.0000.03010.98
5.2.30.0000.06310.96
5.2.20.0100.03010.85
5.2.10.0000.03010.91
5.2.00.0030.06010.71
5.1.60.0000.02710.05
5.1.50.0030.0309.90
5.1.40.0030.0379.88
5.1.30.0000.03710.33
5.1.20.0030.02710.26
5.1.10.0030.02710.03
5.1.00.0070.02310.08
5.0.50.0070.0238.55
5.0.40.0070.0438.55
5.0.30.0000.0438.55
5.0.20.0030.0438.55
5.0.10.0070.0378.55
5.0.00.0030.0538.55
4.4.90.0030.0238.55
4.4.80.0000.0278.55
4.4.70.0000.0208.55
4.4.60.0000.0178.55
4.4.50.0000.0178.55
4.4.40.0000.0378.55
4.4.30.0000.0208.55
4.4.20.0070.0238.55
4.4.10.0000.0178.55
4.4.00.0000.0538.55
4.3.110.0000.0378.55
4.3.100.0070.0278.55
4.3.90.0030.0308.55
4.3.80.0000.0338.55
4.3.70.0030.0208.55
4.3.60.0100.0278.55
4.3.50.0000.0438.55
4.3.40.0030.0378.55
4.3.30.0000.0378.55
4.3.20.0030.0278.55
4.3.10.0000.0208.55
4.3.00.0000.0178.55

preferences:
48.89 ms | 400 KiB | 5 Q