3v4l.org

run code in 300+ PHP versions simultaneously
<?php $posts = array('post1', 'post2', 'post3', 'post4', 'post5', 'post6', 'post7', 'post8', 'post9'); // one foreach to divide posts $col = 1; foreach($posts as $post) { $cols[$col] = $post; $col = $col == 4 ? 1 : $col+1; } // then, another foreach for the html foreach($cols as $col) { // open col div echo "<div>"; foreach($col as $post) { // print post echo "$post,"; } // close col div echo "</div>"; }

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.0070.01116.75
8.3.50.0090.01121.93
8.3.40.0070.01018.82
8.3.30.0070.00719.02
8.3.20.0080.00020.04
8.3.10.0000.00821.93
8.3.00.0080.00019.38
8.2.180.0100.01418.54
8.2.170.0140.00322.96
8.2.160.0060.00820.43
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00419.48
8.2.110.0030.00619.27
8.2.100.0080.00417.88
8.2.90.0040.00419.17
8.2.80.0030.00617.97
8.2.70.0050.00317.50
8.2.60.0000.00818.05
8.2.50.0000.00918.07
8.2.40.0030.00519.88
8.2.30.0030.00518.16
8.2.20.0000.00817.61
8.2.10.0070.00017.99
8.2.00.0000.00817.64
8.1.280.0080.00825.92
8.1.270.0110.00019.05
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0040.00422.23
8.1.230.0040.00717.66
8.1.220.0040.00417.77
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0070.00018.10
8.1.170.0060.00318.94
8.1.160.0070.00022.01
8.1.150.0000.00818.89
8.1.140.0070.00017.50
8.1.130.0030.00317.75
8.1.120.0000.00717.41
8.1.110.0000.00717.49
8.1.100.0040.00417.32
8.1.90.0050.00217.50
8.1.80.0000.00717.48
8.1.70.0030.00517.45
8.1.60.0040.00417.51
8.1.50.0000.00817.57
8.1.40.0040.00417.42
8.1.30.0030.00617.47
8.1.20.0000.00717.62
8.1.10.0000.00717.54
8.1.00.0080.00017.36
8.0.300.0000.00718.77
8.0.290.0020.00516.63
8.0.280.0030.00318.48
8.0.270.0040.00417.16
8.0.260.0030.00517.16
8.0.250.0070.00017.05
8.0.240.0070.00016.95
8.0.230.0040.00416.91
8.0.220.0070.00016.96
8.0.210.0040.00416.82
8.0.200.0030.00317.02
8.0.190.0030.00316.88
8.0.180.0000.00816.99
8.0.170.0040.00416.98
8.0.160.0050.00317.00
8.0.150.0000.00716.84
8.0.140.0000.00916.87
8.0.130.0000.00613.37
8.0.120.0000.00716.94
8.0.110.0000.00816.86
8.0.100.0000.00716.98
8.0.90.0000.00816.98
8.0.80.0030.01317.00
8.0.70.0050.00216.82
8.0.60.0040.00416.84
8.0.50.0000.00716.90
8.0.30.0090.01416.98
8.0.20.0100.00917.40
8.0.10.0040.00417.07
8.0.00.0110.00916.84
7.4.330.0030.00315.08
7.4.320.0030.00316.51
7.4.300.0060.00016.48
7.4.290.0050.00216.61
7.4.280.0040.00416.63
7.4.270.0060.00016.43
7.4.260.0070.00016.52
7.4.250.0040.00416.53
7.4.240.0040.00416.50
7.4.230.0030.00316.65
7.4.220.0130.00316.62
7.4.210.0060.00916.57
7.4.200.0000.00716.63
7.4.160.0080.00816.57
7.4.150.0160.00717.40
7.4.140.0100.01017.86
7.4.130.0100.01116.60
7.4.120.0080.00916.50
7.4.110.0090.00916.61
7.4.100.0090.00916.39
7.4.90.0040.01216.61
7.4.80.0070.01119.39
7.4.70.0060.01016.43
7.4.60.0100.00716.57
7.4.50.0000.00416.35
7.4.40.0070.01116.23
7.4.30.0140.00916.45
7.4.00.0030.01014.89
7.3.330.0030.00313.14
7.3.320.0050.00913.17
7.3.310.0030.00316.22
7.3.300.0060.00016.33
7.3.290.0080.00916.42
7.3.280.0060.01016.38
7.3.270.0050.01217.40
7.3.260.0090.00916.46
7.3.250.0080.01516.50
7.3.240.0120.00616.26
7.3.230.0080.01016.39
7.3.210.0100.00716.57
7.3.200.0060.01419.39
7.3.190.0090.00916.29
7.3.180.0100.00716.39
7.3.170.0030.01316.28
7.3.160.0110.01116.31
7.3.10.0080.00516.54
7.3.00.0030.01016.82
7.2.330.0090.00916.59
7.2.320.0060.01316.73
7.2.310.0180.00316.42
7.2.300.0080.00916.80
7.2.290.0110.01216.52
7.2.130.0070.00817.01
7.2.120.0060.00616.92
7.2.110.0030.01016.93
7.2.100.0030.01216.74
7.2.90.0050.01116.84
7.2.80.0020.01116.85
7.2.70.0090.00817.02
7.2.60.0090.00516.79
7.2.50.0070.00617.00
7.2.40.0040.01016.86
7.2.30.0090.00617.06
7.2.20.0080.00516.86
7.2.10.0050.00616.81
7.2.00.0060.00617.81
7.1.250.0050.00815.86
7.1.200.0090.00316.02
7.1.100.0030.00618.32
7.1.70.0030.00617.26
7.1.60.0150.00619.50
7.1.50.0110.00016.93
7.1.00.0030.07722.44
7.0.200.0140.01116.47
7.0.140.0070.03321.96
7.0.60.0000.08720.01
7.0.50.0000.04017.82
7.0.40.0130.08320.30
7.0.30.0130.04720.30
7.0.20.0230.05020.13
7.0.10.0330.05720.17
7.0.00.0070.06720.19
5.6.280.0000.07720.89
5.6.210.0030.09020.46
5.6.200.0000.04718.19
5.6.190.0100.04020.77
5.6.180.0270.03720.62
5.6.170.0230.05720.62
5.6.160.0130.07720.37
5.6.150.0100.05018.09
5.6.140.0070.07718.09
5.6.130.0070.07318.18
5.6.120.0100.07021.13
5.6.110.0170.06721.11
5.6.100.0000.05021.08
5.6.90.0000.06320.97
5.6.80.0000.04320.28
5.6.70.0230.08320.39
5.5.350.0330.05720.33
5.5.340.0070.04717.92
5.5.330.0070.08720.15
5.5.320.0000.04320.40
5.5.310.0270.08020.28
5.5.300.0030.04317.91
5.5.290.0070.06717.98
5.5.280.0100.05320.68
5.5.270.0000.04320.97
5.5.260.0070.08320.86
5.5.250.0130.07020.70
5.5.240.0070.05020.18
5.4.450.0800.05019.60
5.4.440.0900.08019.63
5.4.430.0170.05319.47
5.4.420.0770.07319.13
5.4.410.0900.05319.36
5.4.400.0270.05318.81
5.4.390.0230.06018.55
5.4.380.0270.05718.77
5.4.370.0400.06718.71
5.4.360.0330.04718.57
5.4.350.0330.06718.77
5.4.340.0230.05018.53
5.4.320.0230.05718.48
5.4.310.0270.05318.58
5.4.300.0230.05718.68
5.4.290.0230.05318.55
5.4.280.0330.04318.70
5.4.270.0270.05718.46
5.4.260.0270.05318.63
5.4.250.0230.05718.61
5.4.240.0270.07718.58
5.4.230.0130.07718.49
5.4.220.0200.06018.65
5.4.210.0330.05018.63
5.4.200.0430.05716.64
5.4.190.0270.06018.75
5.4.180.0400.05318.64
5.4.170.0330.05318.66
5.4.160.0330.05018.65
5.4.150.0300.05318.61
5.4.140.0370.04016.18
5.4.130.0170.06016.26
5.4.120.0370.05016.25
5.4.110.0370.06016.14
5.4.100.0470.05716.20
5.4.90.0200.05316.31
5.4.80.0200.05316.24
5.4.70.0200.05716.28
5.4.60.0270.04716.28
5.4.50.0230.05016.13
5.4.40.0170.05716.18
5.4.30.0230.05016.00
5.4.20.0300.04716.06
5.4.10.0300.04316.23
5.4.00.0130.05715.62
5.3.290.0100.06714.59
5.3.280.0200.05714.65
5.3.270.0200.06014.59
5.3.260.0330.04714.70
5.3.250.0370.06014.59
5.3.240.0300.04714.64
5.3.230.0430.05314.59
5.3.220.0370.04714.46
5.3.210.0200.06014.66
5.3.200.0200.05714.64
5.3.190.0270.05014.59
5.3.180.0330.04714.51
5.3.170.0230.05714.65
5.3.160.0330.04714.64
5.3.150.0270.05314.59
5.3.140.0330.04714.48
5.3.130.0370.04314.57
5.3.120.0300.05314.47
5.3.110.0230.05714.48
5.3.100.0270.05013.93
5.3.90.0270.04714.00
5.3.80.0200.05714.09
5.3.70.0270.05013.98
5.3.60.0300.06713.93
5.3.50.0330.05013.86
5.3.40.0370.03713.88
5.3.30.0230.05313.82
5.3.20.0270.05013.64
5.3.10.0200.05313.62
5.3.00.0270.05313.63
5.2.170.0370.04711.12
5.2.160.0200.04311.20
5.2.150.0170.04711.20
5.2.140.0270.04011.18
5.2.130.0270.03311.02
5.2.120.0300.03011.16
5.2.110.0170.04011.17
5.2.100.0200.05011.24
5.2.90.0200.05711.04
5.2.80.0300.03011.13
5.2.70.0100.05311.13
5.2.60.0270.05011.03
5.2.50.0230.04011.00
5.2.40.0130.04710.98
5.2.30.0130.04311.03
5.2.20.0270.03011.04
5.2.10.0100.04310.83
5.2.00.0170.04010.86
5.1.60.0230.03010.11
5.1.50.0330.03310.05
5.1.40.0270.03010.03
5.1.30.0130.04310.29
5.1.20.0130.04010.50
5.1.10.0100.04310.18
5.1.00.0200.03310.06
5.0.50.0130.0308.63
5.0.40.0100.0308.55
5.0.30.0130.0478.20
5.0.20.0030.0378.21
5.0.10.0130.0338.30
5.0.00.0130.0538.34
4.4.90.0170.0275.88
4.4.80.0130.0205.86
4.4.70.0100.0235.89
4.4.60.0170.0175.82
4.4.50.0100.0235.90
4.4.40.0100.0375.82
4.4.30.0100.0275.86
4.4.20.0100.0205.97
4.4.10.0170.0336.01
4.4.00.0200.0375.95
4.3.110.0070.0235.84
4.3.100.0100.0205.82
4.3.90.0130.0175.83
4.3.80.0070.0375.79
4.3.70.0100.0205.79
4.3.60.0070.0275.79
4.3.50.0030.0275.82
4.3.40.0100.0335.76
4.3.30.0070.0204.65
4.3.20.0030.0234.64
4.3.10.0070.0204.54
4.3.00.0170.0236.77

preferences:
53.96 ms | 401 KiB | 5 Q