3v4l.org

run code in 300+ PHP versions simultaneously
<?php $posts = range(1, 10); // Collect all of your posts into an array, as an example I'm just using numbers. $posts_reordered = ['left' => [], 'middle' => [], 'right' => []]; foreach(array_chunk($posts, 3) as $chunk) { $posts_reordered['left'][] = $chunk[0]; if(isset($chunk[1])) { $posts_reordered['middle'][] = $chunk[1]; } if(isset($chunk[2])) { $posts_reordered['right'][] = $chunk[2]; } } // Now, print HTML $i = 1; foreach($posts_reordered as $key => $column_posts) { $outer_div_class = ".$key"; // .left echo "<div class='$outer_div_class'>\n"; foreach($column_posts as $post) { $inner_div_class = ".col$i"; echo "\t<div class='$inner_div_class'>$post</div>\n\n"; } echo "</div>\n"; $i++; }

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.5.10.0100.01020.14
8.5.00.0120.01221.71
8.4.160.0070.00422.37
8.4.150.0010.00114.05
8.4.140.0100.01117.86
8.4.130.0130.00817.71
8.4.120.0120.00820.61
8.4.110.0100.01122.60
8.4.100.0110.00917.85
8.4.90.0130.00722.73
8.4.80.0040.00419.44
8.4.70.0100.00518.13
8.4.60.0100.01018.82
8.4.50.0060.00418.57
8.4.40.0040.00719.42
8.4.30.0110.01417.58
8.4.20.0060.00318.80
8.4.10.0060.00317.82
8.3.280.0160.00618.29
8.3.270.0120.00816.74
8.3.260.0050.00316.64
8.3.250.0100.00918.93
8.3.240.0100.00916.41
8.3.230.0140.00616.78
8.3.220.0090.00917.31
8.3.210.0100.00518.55
8.3.200.0060.00316.80
8.3.190.0090.01120.66
8.3.180.0110.00916.84
8.3.170.0120.00616.98
8.3.160.0120.00620.09
8.3.150.0150.00318.79
8.3.140.0070.01116.96
8.3.130.0040.00418.41
8.3.120.0100.00019.22
8.3.110.0080.00020.94
8.3.100.0040.00424.06
8.3.90.0040.00426.77
8.3.80.0070.00318.25
8.3.70.0040.01116.75
8.3.60.0140.00418.31
8.3.50.0130.01122.11
8.3.40.0070.00718.88
8.3.30.0140.00018.77
8.3.20.0160.00320.85
8.3.10.0090.00021.73
8.3.00.0080.00019.68
8.2.290.0110.00720.50
8.2.280.0110.00818.62
8.2.270.0120.00619.04
8.2.260.0080.00016.43
8.2.250.0070.00318.47
8.2.240.0060.00318.87
8.2.230.0030.00622.58
8.2.220.0110.00737.54
8.2.210.0040.00426.77
8.2.200.0060.00316.75
8.2.190.0120.00316.58
8.2.180.0170.00318.54
8.2.170.0110.00418.95
8.2.160.0070.01022.96
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00021.04
8.2.120.0040.00426.35
8.2.110.0080.00019.27
8.2.100.0090.00318.03
8.2.90.0030.00617.88
8.2.80.0100.00017.97
8.2.70.0040.00417.63
8.2.60.0060.00317.63
8.2.50.0000.00917.93
8.2.40.0040.00419.47
8.2.30.0030.00621.02
8.2.20.0050.00318.05
8.2.10.0080.00018.11
8.2.00.0000.00717.63
8.1.330.0120.00622.00
8.1.320.0130.00616.10
8.1.310.0070.00718.15
8.1.300.0030.00719.51
8.1.290.0090.00030.84
8.1.280.0130.00325.92
8.1.270.0040.00422.01
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0030.00622.07
8.1.230.0060.00618.96
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0070.00417.38
8.1.190.0050.00317.23
8.1.180.0080.00018.10
8.1.170.0040.00417.62
8.1.160.0040.00418.94
8.1.150.0050.00220.22
8.1.140.0000.00719.61
8.1.130.0000.00818.93
8.1.120.0030.00317.53
8.1.110.0070.00017.36
8.1.100.0030.00617.39
8.1.90.0040.00317.46
8.1.80.0000.00717.41
8.1.70.0030.00517.32
8.1.60.0030.00617.46
8.1.50.0050.00317.42
8.1.40.0020.00517.52
8.1.30.0050.00317.64
8.1.20.0050.00217.70
8.1.10.0030.00517.60
8.1.00.0030.00717.49
8.0.300.0040.00420.00
8.0.290.0000.00816.75
8.0.280.0000.00718.46
8.0.270.0030.00616.82
8.0.260.0040.00417.39
8.0.250.0070.00016.95
8.0.240.0030.00616.83
8.0.230.0040.00416.83
8.0.220.0040.00416.77
8.0.210.0030.00516.89
8.0.200.0070.00316.97
8.0.190.0050.00316.99
8.0.180.0040.00416.89
8.0.170.0030.00916.94
8.0.160.0030.00316.88
8.0.150.0040.00416.86
8.0.140.0000.00816.91
8.0.130.0030.00313.35
8.0.120.0030.00516.89
8.0.110.0080.00016.77
8.0.100.0080.00016.88
8.0.90.0000.00716.96
8.0.80.0030.01316.96
8.0.70.0070.00016.80
8.0.60.0000.00716.68
8.0.50.0080.00016.80
8.0.30.0110.00917.18
8.0.20.0100.01217.40
8.0.10.0000.00716.91
8.0.00.0090.00917.01
7.4.330.0020.00215.55
7.4.320.0040.00416.64
7.4.300.0030.00316.52
7.4.290.0080.00016.50
7.4.280.0040.00416.55
7.4.270.0050.00316.56
7.4.260.0030.00516.35
7.4.250.0030.00316.47
7.4.240.0000.00816.52
7.4.230.0030.00316.63
7.4.220.0120.00816.50
7.4.210.0160.00316.61
7.4.200.0040.00416.58
7.4.160.0120.00516.63
7.4.150.0140.00817.40
7.4.140.0090.01217.86
7.4.130.0090.00916.50
7.4.120.0100.01116.49
7.4.110.0120.00616.59
7.4.100.0110.00716.62
7.4.90.0110.00716.69
7.4.80.0190.00319.39
7.4.70.0140.00316.67
7.4.60.0110.00616.33
7.4.50.0100.00016.50
7.4.40.0080.00816.43
7.4.30.0110.00716.37
7.4.00.0110.00814.97
7.3.330.0060.00013.22
7.3.320.0000.00513.13
7.3.310.0040.00416.15
7.3.300.0030.00316.24
7.3.290.0080.00916.35
7.3.280.0090.00716.34
7.3.270.0140.00417.40
7.3.260.0050.01616.47
7.3.250.0080.01016.48
7.3.240.0080.01016.26
7.3.230.0120.00616.56
7.3.210.0110.00616.39
7.3.200.0110.01116.25
7.3.190.0120.00516.34
7.3.180.0110.00616.50
7.3.170.0100.00716.35
7.3.160.0120.00616.55
7.3.120.0040.01414.92
7.3.110.0070.00714.88
7.3.100.0090.00014.75
7.3.90.0060.00614.75
7.3.80.0030.00914.65
7.3.70.0070.00714.75
7.3.60.0040.01415.02
7.3.50.0090.00314.79
7.3.40.0040.00714.99
7.3.30.0070.00714.55
7.3.20.0000.01416.42
7.3.10.0070.00816.51
7.3.00.0050.00916.62
7.2.330.0090.01216.54
7.2.320.0130.00616.88
7.2.310.0060.01216.54
7.2.300.0070.01116.57
7.2.290.0100.01316.77
7.2.250.0090.00914.98
7.2.240.0070.01015.16
7.2.230.0100.00715.19
7.2.220.0000.01714.94
7.2.210.0110.00414.93
7.2.200.0030.01714.97
7.2.190.0100.01015.16
7.2.180.0030.01014.95
7.2.170.0080.00815.20
7.2.130.0060.00916.77
7.2.120.0000.01517.08
7.2.110.0060.00616.97
7.2.100.0080.00417.19
7.2.90.0070.00717.16
7.2.80.0070.00317.13
7.2.70.0030.00917.18
7.2.60.0050.01116.68
7.2.50.0040.00917.11
7.2.40.0080.00416.80
7.2.30.0060.00916.71
7.2.20.0030.01017.04
7.2.10.0040.01116.83
7.2.00.0080.00616.94
7.1.330.0060.01015.82
7.1.320.0110.00315.63
7.1.310.0080.00415.92
7.1.300.0000.01115.64
7.1.290.0060.00615.70
7.1.280.0030.01015.66
7.1.270.0090.00315.71
7.1.260.0030.01016.05
7.1.250.0000.01115.90
7.1.200.0070.00315.80
7.1.70.0040.01317.09
7.1.60.0100.00317.04
7.1.00.0100.06722.63
7.0.200.0000.00716.78
7.0.140.0170.07722.13
7.0.130.0030.07721.96
7.0.120.0270.06722.23
7.0.110.0130.07722.04
7.0.100.0130.07322.17
7.0.90.0230.06322.17
7.0.80.0200.06322.18
7.0.70.0030.06322.25
7.0.60.0100.08022.05
7.0.50.0100.06022.06
7.0.40.0000.06722.00
7.0.30.0070.07722.11
7.0.20.0100.07722.17
7.0.10.0000.08322.18
7.0.00.0070.08722.11
5.6.290.0070.07320.92
5.6.280.0100.05721.08
5.6.270.0130.06321.14
5.6.260.0030.06020.91
5.6.250.0070.06720.91
5.6.240.0070.06020.87
5.6.230.0130.07320.92
5.6.220.0030.06720.80
5.6.210.0070.08720.84
5.6.200.0100.06021.06
5.6.190.0130.05721.04
5.6.180.0130.07721.00
5.6.170.0100.05721.02
5.6.160.0070.08020.78
5.6.150.0070.06021.06
5.6.140.0130.05320.88
5.6.130.0170.05720.86
5.6.120.0100.05720.87
5.6.110.0030.07021.04
5.6.100.0170.05020.86
5.6.90.0100.05720.87
5.6.80.0170.04320.27
5.6.70.0070.05320.24
5.6.60.0030.06320.23
5.6.50.0130.05020.38
5.6.40.0170.06720.18
5.6.30.0300.05720.36
5.6.20.0070.05720.10
5.6.10.0130.04720.17
5.6.00.0070.05320.16

preferences:
177.41 ms | 403 KiB | 5 Q