3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [1,2,3,6,7,8,9,11,33,44,55,66,77,88,16,18], [17,52,38,666,79,8,9,15,33,44,55,66,76,88,16,18], [17,562,538,7666,579,688,9,15,933,44,55,660,76,808,106,108], ]; $count = count($array); $mins = []; $maxs = []; $avgs = []; foreach ($array as $i => $row) { foreach ($row as $col => $value) { $ch = $col + 1; if (!$i) { $mins[$ch] = $value; $maxs[$ch] = $value; $avgs[$ch] = $value; } else { if ($value < $mins[$ch]) { $mins[$ch] = $value; } if ($value > $maxs[$ch]) { $maxs[$ch] = $value; } $avgs[$ch] += $value; if ($i === $count - 1) { $avgs[$ch] = number_format($avgs[$ch] / $count, 2); } } } } echo '<table border=1>'; printf( '<tr><th>Channels</th><th>CH%s</th></tr>', implode('</th><th>CH', array_keys($avgs)) ); printf( '<tr><th>Average</th><td>%s</td></tr>', implode('</td><td>', $avgs) ); printf( '<tr><th>Max</th><th>%s</td></tr>', implode('</td><td>', $maxs) ); printf( '<tr><th>Min</th><td>%s</td></tr>', implode('</td><td>', $mins) ); echo '</table>';

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.70.0090.01216.58
8.3.60.0000.01518.55
8.3.50.0140.00418.28
8.3.40.0100.00720.61
8.3.30.0040.01118.51
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.190.0040.01116.63
8.2.180.0150.00325.92
8.2.170.0100.00718.91
8.2.160.0140.00022.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0040.00420.66
8.2.110.0030.00620.47
8.2.100.0040.00817.84
8.2.90.0050.00319.19
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0030.00518.05
8.2.50.0040.00418.07
8.2.40.0000.00918.34
8.2.30.0000.00818.20
8.2.20.0030.00519.25
8.2.10.0080.00018.19
8.2.00.0000.00719.31
8.1.280.0140.00725.92
8.1.270.0150.00424.66
8.1.260.0130.00726.35
8.1.250.0070.00028.09
8.1.240.0000.00923.86
8.1.230.0040.00821.02
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0070.00317.48
8.1.190.0000.00917.35
8.1.180.0000.00818.10
8.1.170.0100.00018.78
8.1.160.0000.00719.05
8.1.150.0040.00418.70
8.1.140.0050.00517.48
8.1.130.0070.00018.88
8.1.120.0000.00717.56
8.1.110.0040.00417.46
8.1.100.0070.00017.55
8.1.90.0040.00417.47
8.1.80.0080.00017.50
8.1.70.0070.00017.38
8.1.60.0040.00417.63
8.1.50.0050.00217.61
8.1.40.0030.00517.56
8.1.30.0050.00217.57
8.1.20.0040.00417.58
8.1.10.0050.00317.48
8.1.00.0040.00417.61
8.0.300.0080.00018.77
8.0.290.0000.00716.75
8.0.280.0040.00418.43
8.0.270.0040.00416.89
8.0.260.0000.00618.42
8.0.250.0070.00017.00
8.0.240.0030.00617.00
8.0.230.0030.00316.84
8.0.220.0050.00316.98
8.0.210.0030.00316.81
8.0.200.0030.00516.87
8.0.190.0030.00316.99
8.0.180.0000.00716.95
8.0.170.0040.00416.86
8.0.160.0040.00416.91
8.0.150.0030.00516.83
8.0.140.0030.00316.92
8.0.130.0040.00416.73
8.0.120.0070.00016.93
8.0.110.0080.00016.88
8.0.100.0050.00316.92
8.0.90.0030.00316.82
8.0.80.0030.00317.02
8.0.70.0050.00316.82
8.0.60.0040.00416.93
8.0.50.0030.00317.04
8.0.30.0030.00317.00
8.0.20.0040.00416.80
8.0.10.0000.00716.93
7.4.330.0030.00315.55
7.4.320.0030.00316.73
7.4.300.0000.00716.62
7.4.290.0000.00616.54
7.4.280.0030.00516.64
7.4.270.0000.00716.51
7.4.260.0000.00716.61
7.4.250.0030.00316.45
7.4.240.0000.00816.60
7.4.230.0080.00016.54
7.4.220.0000.00816.51
7.4.210.0030.00316.57
7.4.200.0000.00716.62
7.4.190.0030.00316.62
7.4.180.0040.00416.62
7.4.160.0000.00616.60
7.4.150.0040.00416.48
7.4.140.0000.00716.25
7.4.130.0030.00316.52
7.4.120.0030.00316.47
7.4.110.0000.00616.52
7.4.100.0000.00716.39
7.4.90.0000.00616.32
7.4.80.0060.00016.36
7.4.70.0040.00416.15
7.4.60.0070.00016.35
7.4.50.0060.00016.41
7.4.40.0060.00016.42
7.4.30.0000.00716.52
7.4.20.0000.00716.52
7.4.10.0000.00616.41
7.4.00.0030.00316.38

preferences:
24.22 ms | 401 KiB | 5 Q