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 = ''; 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>\n" : ''; 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.60.0090.00618.43
8.3.50.0110.00721.98
8.3.40.0100.00518.53
8.3.30.0060.00918.75
8.3.20.0050.00318.81
8.3.10.0080.00020.92
8.3.00.0040.00423.52
8.2.180.0140.00616.50
8.2.170.0110.00422.96
8.2.160.0030.01320.28
8.2.150.0030.00624.18
8.2.140.0090.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00821.11
8.2.110.0030.00620.36
8.2.100.0000.01117.78
8.2.90.0040.00419.29
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0060.00318.28
8.2.30.0030.00521.27
8.2.20.0000.00817.74
8.2.10.0040.00417.68
8.2.00.0070.00017.87
8.1.280.0060.01025.92
8.1.270.0070.00023.99
8.1.260.0070.01426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.46
8.1.230.0080.00420.88
8.1.220.0000.00818.77
8.1.210.0000.00818.97
8.1.200.0040.00417.25
8.1.190.0040.00417.39
8.1.180.0080.00018.10
8.1.170.0050.00318.64
8.1.160.0030.00618.92
8.1.150.0040.00418.61
8.1.140.0040.00417.57
8.1.130.0030.00317.85
8.1.120.0000.00717.40
8.1.110.0070.00017.37
8.1.100.0000.00717.52
8.1.90.0070.00017.48
8.1.80.0000.00817.45
8.1.70.0030.00517.45
8.1.60.0110.00017.50
8.1.50.0020.00517.52
8.1.40.0000.00817.44
8.1.30.0040.00417.56
8.1.20.0000.00817.71
8.1.10.0040.00417.55
8.1.00.0000.00817.45
8.0.300.0000.00720.11
8.0.290.0030.00417.05
8.0.280.0000.00718.48
8.0.270.0050.00317.39
8.0.260.0030.00316.72
8.0.250.0000.00717.00
8.0.240.0000.00816.82
8.0.230.0070.00017.02
8.0.220.0040.00416.91
8.0.210.0000.00716.92
8.0.200.0060.00316.98
8.0.190.0030.00316.88
8.0.180.0040.00416.89
8.0.170.0000.00716.96
8.0.160.0070.00016.88
8.0.150.0060.00316.86
8.0.140.0080.00016.88
8.0.130.0050.00013.36
8.0.120.0070.00016.86
8.0.110.0050.00316.98
8.0.100.0040.00416.78
8.0.90.0000.00816.72
8.0.80.0070.00716.98
8.0.70.0000.00716.88
8.0.60.0030.00516.98
8.0.50.0040.00416.82
8.0.30.0100.00917.11
8.0.20.0100.00817.40
8.0.10.0000.00816.99
8.0.00.0080.01016.73
7.4.330.0020.00214.79
7.4.320.0030.00316.43
7.4.300.0030.00316.61
7.4.290.0030.00316.63
7.4.280.0040.00416.52
7.4.270.0000.00716.64
7.4.260.0030.00313.22
7.4.250.0070.00016.40
7.4.240.0040.00416.47
7.4.230.0030.00316.36
7.4.220.0100.00716.55
7.4.210.0070.00716.54
7.4.200.0000.00816.68
7.4.190.0030.00316.68
7.4.160.0030.01316.75
7.4.150.0090.00917.40
7.4.140.0140.00317.86
7.4.130.0110.00816.53
7.4.120.0080.01116.38
7.4.110.0160.00616.58
7.4.100.0070.01016.45
7.4.90.0160.00716.47
7.4.80.0110.00719.39
7.4.70.0120.00916.50
7.4.60.0090.00616.45
7.4.50.0000.00516.28
7.4.40.0100.00322.77
7.4.30.0040.01216.57
7.4.00.0110.00714.89
7.3.330.0000.00613.19
7.3.320.0000.00513.09
7.3.310.0030.00316.43
7.3.300.0030.00316.36
7.3.290.0090.00616.39
7.3.280.0080.01116.34
7.3.270.0090.00917.40
7.3.260.0100.00718.24
7.3.250.0090.00916.58
7.3.240.0120.01216.25
7.3.230.0090.00916.39
7.3.210.0060.01316.33
7.3.200.0160.00719.39
7.3.190.0080.00816.67
7.3.180.0100.00716.49
7.3.170.0040.01716.41
7.3.160.0120.00816.29
7.3.120.0030.01014.83
7.3.10.0000.01016.65
7.3.00.0090.00616.63
7.2.330.0090.00916.68
7.2.320.0030.01416.86
7.2.310.0150.00916.71
7.2.300.0070.01016.57
7.2.290.0060.01016.58
7.2.130.0070.00716.35
7.2.120.0000.01116.75
7.2.110.0120.00616.89
7.2.100.0090.00616.34
7.2.90.0000.01316.84
7.2.80.0060.00616.88
7.2.70.0070.00416.57
7.2.60.0020.01416.95
7.2.50.0050.00516.89
7.2.40.0030.01016.74
7.2.30.0030.01016.65
7.2.20.0110.00016.75
7.2.10.0040.01116.82
7.2.00.0060.00818.00
7.1.250.0050.00615.77
7.1.200.0030.00915.97
7.1.100.0120.01216.32
7.1.70.0000.01017.18
7.1.60.0070.00417.36
7.1.50.0110.01116.99
7.1.00.0000.03722.48
7.0.200.0000.00716.97
7.0.140.0030.07022.03
7.0.60.0100.07319.89
7.0.50.0070.07317.87
7.0.40.0030.05319.99
7.0.30.0470.04020.30
7.0.20.0170.05320.34
7.0.10.0230.05020.29
7.0.00.0200.07019.99
5.6.280.0030.07320.81
5.6.210.0030.05320.50
5.6.200.0130.04018.09
5.6.190.0100.08020.41
5.6.180.0470.04020.28
5.6.170.0400.04320.61
5.6.160.0130.04720.32
5.6.150.0030.05318.17
5.6.140.0070.03718.08
5.6.130.0100.07718.14
5.6.120.0000.04721.00
5.6.110.0070.08721.01
5.6.100.0070.08021.04
5.6.90.0100.08720.96
5.6.80.0170.06720.38
5.6.70.0300.06320.36
5.5.350.0230.04320.46
5.5.340.0000.04717.95
5.5.330.0070.08320.23
5.5.320.0070.04720.21
5.5.310.0130.04720.31
5.5.300.0100.04318.02
5.5.290.0100.07717.92
5.5.280.0070.07720.77
5.5.270.0070.08320.79
5.5.260.0070.08320.79
5.5.250.0130.05020.76
5.5.240.0070.03720.15
5.4.450.0270.05019.39
5.4.440.0330.04719.45
5.4.430.0430.05719.13
5.4.420.0270.04019.48
5.4.410.0230.04719.28
5.4.400.0300.06719.16
5.4.390.0300.05319.13
5.4.380.0230.06719.08
5.4.370.0200.04019.21
5.4.360.0270.04019.10
5.4.350.0330.06719.09
5.4.340.0330.05019.24
5.4.320.0270.04718.93
5.4.310.0430.06019.13
5.4.300.0270.04319.07
5.4.290.0430.06318.91
5.4.280.0400.04018.92
5.4.270.0300.05319.15
5.4.260.0270.04719.08
5.4.250.0330.05319.24
5.4.240.0330.07719.09
5.4.230.0470.05719.13
5.4.220.0370.06719.15
5.4.210.0470.05018.78
5.4.200.0330.04719.05
5.4.190.0300.03719.07
5.4.180.0370.04319.23
5.4.170.0300.05018.92
5.4.160.0330.06019.13
5.4.150.0270.06719.06
5.4.140.0300.03316.31
5.4.130.0370.04016.25
5.4.120.0270.03716.35
5.4.110.0370.06016.48
5.4.100.0300.03716.46
5.4.90.0300.03316.48
5.4.80.0330.03716.42
5.4.70.0300.04016.33
5.4.60.0370.05316.20
5.4.50.0270.04016.39
5.4.40.0330.07716.36
5.4.30.0370.06316.47
5.4.20.0400.05716.46
5.4.10.0330.06016.31
5.4.00.0270.05315.84
5.3.290.0370.06314.50
5.3.280.0370.04314.43
5.3.270.0330.05314.55
5.3.260.0330.07714.45
5.3.250.0230.04314.46
5.3.240.0330.04714.63
5.3.230.0330.06014.68
5.3.220.0330.03014.61
5.3.210.0330.06014.42
5.3.200.0400.05314.43
5.3.190.0370.05014.41
5.3.180.0330.07014.61
5.3.170.0330.03314.51
5.3.160.0370.07014.46
5.3.150.0300.04714.42
5.3.140.0270.05314.43
5.3.130.0370.06714.42
5.3.120.0300.07014.52
5.3.110.0400.05714.57
5.3.100.0330.05013.94
5.3.90.0330.07014.05
5.3.80.0270.03713.89
5.3.70.0270.05714.07
5.3.60.0330.04714.03
5.3.50.0330.07013.93
5.3.40.0330.05013.78
5.3.30.0230.06713.96
5.3.20.0430.04013.64
5.3.10.0330.05713.51
5.3.00.0370.06013.62
5.2.170.0230.05311.16
5.2.160.0370.05311.15
5.2.150.0270.03711.19
5.2.140.0300.05711.29
5.2.130.0270.05711.05
5.2.120.0270.03011.27
5.2.110.0300.05310.98
5.2.100.0300.05710.96
5.2.90.0230.02710.96
5.2.80.0230.02710.93
5.2.70.0200.03011.19
5.2.60.0400.04710.88
5.2.50.0330.05710.87
5.2.40.0230.05710.83
5.2.30.0230.06010.83
5.2.20.0230.04011.00
5.2.10.0270.04311.01
5.2.00.0270.03310.63
5.1.60.0200.0309.91
5.1.50.0200.0309.97
5.1.40.0270.04010.04
5.1.30.0230.04010.55
5.1.20.0270.05310.56
5.1.10.0270.0379.94
5.1.00.0230.05310.14
5.0.50.0230.0309.90
5.0.40.0170.0279.90
5.0.30.0170.0579.90
5.0.20.0200.0339.90
5.0.10.0130.0339.90
5.0.00.0130.0509.90
4.4.90.0100.0179.90
4.4.80.0130.0279.90
4.4.70.0130.0209.90
4.4.60.0100.0179.90
4.4.50.0170.0309.90
4.4.40.0200.0409.90
4.4.30.0170.0309.90
4.4.20.0100.0339.90
4.4.10.0170.0309.90
4.4.00.0130.0539.90
4.3.110.0130.0279.90
4.3.100.0130.0309.90
4.3.90.0200.0279.90
4.3.80.0130.0239.90
4.3.70.0100.0279.90
4.3.60.0130.0279.90
4.3.50.0130.0339.90
4.3.40.0200.0239.90
4.3.30.0100.0239.90
4.3.20.0030.0209.90
4.3.10.0070.0179.90
4.3.00.0070.0179.90

preferences:
36.24 ms | 401 KiB | 5 Q