3v4l.org

run code in 300+ PHP versions simultaneously
<?php $images = array( array("image" => "http://example.com/image1.jpg", "description" => "Desc 1"), array("image" => "http://example.com/image2.jpg", "description" => "Desc 2"), array("image" => "http://example.com/image3.jpg", "description" => "Desc 3"), array("image" => "http://example.com/image4.jpg", "description" => "Desc 4") ); $imagesPerRow = 3; $numberOfRows = ceil(count($images) / $imagesPerRow); for ($row = 0; $row < $numberOfRows; $row++) { echo '<div class="row">' . PHP_EOL; $offset = $row * $imagesPerRow; $imagesInRow = array_slice($images, $offset, $imagesPerRow); $columnWidth = 24 / count($imagesInRow); foreach ($imagesInRow as $image) { echo ' <div class="col-md-' . $columnWidth . '">'; echo '<img src="' . $image['image'] .'" alt="' . $image['description'] .'">'; echo '</div>' . PHP_EOL; } echo '</div>' . PHP_EOL; }

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.01016.92
8.5.00.0130.01020.18
8.4.150.0020.00014.05
8.4.140.0120.00917.46
8.4.130.0100.00817.72
8.4.120.0080.00120.86
8.4.110.0120.00818.63
8.4.100.0140.00717.71
8.4.90.0140.00620.64
8.4.80.0110.00920.52
8.4.70.0090.01018.88
8.4.60.0120.00822.23
8.4.50.0100.00917.73
8.4.40.0130.00717.46
8.4.30.0160.00322.24
8.4.20.0100.01018.81
8.4.10.0030.00619.46
8.3.280.0090.01018.45
8.3.270.0100.00916.61
8.3.260.0130.00616.63
8.3.250.0110.00718.90
8.3.240.0090.00918.94
8.3.230.0090.00716.57
8.3.220.0070.01020.72
8.3.210.0080.01116.51
8.3.200.0050.00416.55
8.3.190.0130.00616.95
8.3.180.0100.00917.05
8.3.170.0140.00416.64
8.3.160.0070.01116.64
8.3.150.0110.00719.05
8.3.140.0060.00316.70
8.3.130.0040.00716.48
8.3.120.0060.00320.49
8.3.110.0000.00820.94
8.3.100.0060.00316.50
8.3.90.0000.00826.77
8.3.80.0050.00516.75
8.3.70.0160.00416.58
8.3.60.0140.00718.30
8.3.50.0040.00818.19
8.3.40.0110.00418.74
8.3.30.0090.00618.84
8.3.20.0070.00020.92
8.3.10.0070.00023.48
8.3.00.0050.00322.59
8.2.290.0070.00517.30
8.2.280.0120.00820.14
8.2.270.0040.01216.80
8.2.260.0100.00318.92
8.2.250.0070.00316.92
8.2.240.0120.00318.82
8.2.230.0030.00522.58
8.2.220.0080.00024.06
8.2.210.0080.00026.77
8.2.200.0090.00016.75
8.2.190.0040.01216.75
8.2.180.0040.01125.92
8.2.170.0070.00719.08
8.2.160.0060.00820.23
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00419.54
8.2.120.0050.00326.35
8.2.110.0080.00322.44
8.2.100.0080.00417.84
8.2.90.0000.00922.27
8.2.80.0030.00717.97
8.2.70.0040.00418.05
8.2.60.0040.00418.34
8.2.50.0040.00418.10
8.2.40.0000.00819.45
8.2.30.0000.00819.40
8.2.20.0000.00718.18
8.2.10.0050.00219.45
8.2.00.0070.00018.08
8.1.330.0130.00716.32
8.1.320.0100.00918.01
8.1.310.0070.00416.83
8.1.300.0090.00016.18
8.1.290.0060.00330.84
8.1.280.0120.00625.92
8.1.270.0080.00019.24
8.1.260.0050.00326.35
8.1.250.0060.00328.09
8.1.240.0100.01322.50
8.1.230.0110.00020.95
8.1.220.0040.00417.79
8.1.210.0050.00318.87
8.1.200.0040.00417.35
8.1.190.0090.00017.35
8.1.180.0030.00518.10
8.1.170.0030.00518.66
8.1.160.0050.00218.90
8.1.150.0040.00418.98
8.1.140.0070.00020.31
8.1.130.0000.00620.34
8.1.120.0080.00017.44
8.1.110.0060.00317.49
8.1.100.0040.00417.61
8.1.90.0030.00517.55
8.1.80.0040.00417.44
8.1.70.0070.00317.54
8.1.60.0030.00617.68
8.1.50.0000.00717.59
8.1.40.0080.00017.62
8.1.30.0000.00817.61
8.1.20.0000.00917.62
8.1.10.0050.00317.67
8.1.00.0000.00817.52
8.0.300.0040.00420.04
8.0.290.0000.00916.63
8.0.280.0030.00518.46
8.0.270.0050.00216.78
8.0.260.0080.00018.53
8.0.250.0070.00017.00
8.0.240.0030.00317.00
8.0.230.0040.00416.95
8.0.220.0080.00017.00
8.0.210.0080.00016.94
8.0.200.0060.00016.91
8.0.190.0050.00317.01
8.0.180.0040.00416.89
8.0.170.0060.00317.02
8.0.160.0030.00616.93
8.0.150.0000.01016.89
8.0.140.0070.00016.89
8.0.130.0030.00313.49
8.0.120.0000.00716.95
8.0.110.0060.00316.80
8.0.100.0000.00716.92
8.0.90.0080.00016.76
8.0.80.0130.00216.89
8.0.70.0040.00416.77
8.0.60.0030.00316.88
8.0.50.0000.00717.02
8.0.30.0050.01417.02
8.0.20.0030.02117.04
8.0.10.0000.00716.95
8.0.00.0110.00916.67
7.4.330.0020.00215.55
7.4.320.0060.00016.57
7.4.300.0030.00316.59
7.4.290.0030.00316.52
7.4.280.0040.00416.60
7.4.270.0000.00716.70
7.4.260.0030.00516.59
7.4.250.0030.00316.61
7.4.240.0030.00316.66
7.4.230.0000.00716.57
7.4.220.0040.00416.58
7.4.210.0050.00916.62
7.4.200.0070.00016.69
7.4.160.0090.00816.60
7.4.140.0220.00617.86
7.4.130.0110.00716.74
7.4.120.0090.01516.57
7.4.110.0100.00716.63
7.4.100.0070.01116.60
7.4.90.0140.00616.70
7.4.80.0170.00919.39
7.4.70.0080.01016.43
7.4.60.0030.01216.45
7.4.50.0090.00916.69
7.4.40.0070.01016.62
7.4.00.0120.00315.00
7.3.330.0050.00013.33
7.3.320.0000.00513.21
7.3.310.0070.00016.21
7.3.300.0070.00016.42
7.3.290.0130.00616.46
7.3.280.0090.00716.40
7.3.260.0130.00816.54
7.3.240.0110.00616.55
7.3.230.0040.01316.46
7.3.210.0100.00716.50
7.3.200.0090.01216.49
7.3.190.0040.01416.69
7.3.180.0080.00816.45
7.3.170.0060.01216.46
7.3.160.0100.00816.81
7.3.20.1590.01014.66
7.3.10.4300.01314.68
7.3.00.0100.01014.89
7.2.330.0100.00716.75
7.2.320.0080.01016.64
7.2.310.0030.01516.88
7.2.300.0090.01216.81
7.2.290.0130.01016.43
7.2.150.0230.01014.99
7.2.140.1760.00315.22
7.2.130.4090.01314.95
7.2.120.4540.00714.80
7.2.110.4020.00715.14
7.2.100.4440.01314.81
7.2.90.5580.00714.71
7.2.80.4850.00714.69
7.2.70.4660.00715.13
7.2.60.4800.01014.91
7.2.50.4620.00714.93
7.2.40.4120.01014.84
7.2.30.4790.00015.00
7.2.20.3950.01014.83
7.2.10.3750.00714.93
7.2.00.3530.02315.17
7.1.250.4280.00713.86

preferences:
45.82 ms | 403 KiB | 5 Q