3v4l.org

run code in 300+ PHP versions simultaneously
<?php const DATA = [ [1070, 1023, 'this is the first record'], [1070, 1028, 'this is the second record'], [1098, 1023, 'this is the thrid record'], [1098, 1028, 'this is the fourth record'], [2021, 1023, 'this is the fifth record'], [2021, 1028, 'this is the sixth record'], ]; function group_records(array $data, int $col) { $last = null; $current = []; foreach (DATA as $row) { if ($row[$col] !== $last && $last !== null) { yield $last => $current; $last = null; $current = []; } $last = $row[$col]; $current[] = $row; } if ($last !== null) { yield $last => $current; } } foreach (group_records(DATA, 0) as $key => $rows) { echo "$key:\n"; foreach ($rows as $row) echo " " . implode('|', $row) . "\n"; }

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.4.120.0120.00824.17
8.4.110.0070.01220.50
8.4.100.0050.00518.86
8.4.90.0100.00818.71
8.4.80.0130.00818.98
8.4.70.0110.00417.84
8.4.60.0120.00719.04
8.4.50.0060.00518.66
8.4.40.0040.00417.93
8.4.30.0160.00320.45
8.4.20.0110.01119.46
8.4.10.0070.01417.71
8.3.250.0110.00818.99
8.3.240.0150.00416.92
8.3.230.0080.01116.65
8.3.220.0120.00718.93
8.3.210.0110.00416.54
8.3.200.0040.00516.50
8.3.190.0080.00917.04
8.3.180.0120.00617.04
8.3.170.0100.01020.90
8.3.160.0070.00716.63
8.3.150.0140.00417.18
8.3.140.0150.00316.73
8.3.130.0060.00316.72
8.3.120.0060.00318.88
8.3.110.0090.00316.54
8.3.100.0040.00418.36
8.3.90.0050.00326.77
8.3.80.0060.00316.50
8.3.70.0090.00618.43
8.3.60.0040.01818.43
8.3.50.0070.01124.61
8.3.40.0090.00620.29
8.3.30.0090.00618.83
8.3.20.0070.00020.98
8.3.10.0040.00420.26
8.3.00.0040.00422.26
8.2.290.0110.00820.48
8.2.280.0090.00518.40
8.2.270.0090.00917.47
8.2.260.0150.00316.57
8.2.250.0030.00618.64
8.2.240.0030.00618.38
8.2.230.0030.00620.94
8.2.220.0040.00424.06
8.2.210.0030.00526.77
8.2.200.0090.00018.29
8.2.190.0000.01516.88
8.2.180.0110.01116.88
8.2.170.0070.01122.96
8.2.160.0110.00419.42
8.2.150.0030.00624.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0100.00020.57
8.2.100.0040.00817.72
8.2.90.0080.00017.75
8.2.80.0100.00018.81
8.2.70.0040.00417.50
8.2.60.0000.00817.63
8.2.50.0050.00318.05
8.2.40.0000.00818.22
8.2.30.0050.00319.51
8.2.20.0040.00418.12
8.2.10.0040.00419.19
8.2.00.0070.00019.41
8.1.330.0110.00921.83
8.1.320.0080.00716.10
8.1.310.0050.00318.00
8.1.300.0000.01018.04
8.1.290.0030.00630.84
8.1.280.0070.00725.92
8.1.270.0080.00022.45
8.1.260.0070.00026.35
8.1.250.0050.00228.09
8.1.240.0080.00323.72
8.1.230.0120.00022.72
8.1.220.0030.00518.52
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.35
8.1.180.0030.00618.10
8.1.170.0000.00917.62
8.1.160.0040.00418.98
8.1.150.0060.00318.89
8.1.140.0040.00418.94
8.1.130.0040.00421.93
8.1.120.0040.00417.46
8.1.110.0000.00817.43
8.1.100.0000.00817.35
8.1.90.0070.00017.39
8.1.80.0070.00317.46
8.1.70.0070.00017.48
8.1.60.0000.00917.57
8.1.50.0040.00417.53
8.1.40.0080.00017.55
8.1.30.0000.00817.66
8.1.20.0050.00317.64
8.1.10.0000.00817.57
8.1.00.0000.00717.41
8.0.300.0040.00418.77
8.0.290.0000.00716.58
8.0.280.0000.00818.37
8.0.270.0070.00018.02
8.0.260.0000.00620.01
8.0.250.0080.00016.99
8.0.240.0040.00416.97
8.0.230.0030.00317.03
8.0.220.0030.00316.80
8.0.210.0040.00416.97
8.0.200.0030.00317.03
8.0.190.0080.00017.03
8.0.180.0060.00316.95
8.0.170.0030.00716.80
8.0.160.0040.00416.75
8.0.150.0000.00816.80
8.0.140.0040.00416.85
8.0.130.0030.00313.34
8.0.120.0000.00716.95
8.0.110.0040.00416.81
8.0.100.0000.00716.88
8.0.90.0030.00616.72
8.0.80.0070.01116.96
8.0.70.0070.00016.97
8.0.60.0030.00616.95
8.0.50.0000.00716.76
8.0.30.0060.01217.06
8.0.20.0080.01516.97
8.0.10.0040.00417.09
8.0.00.0120.00816.98
7.4.330.0020.00215.55
7.4.320.0030.00316.61
7.4.300.0030.00316.38
7.4.290.0030.00516.49
7.4.280.0070.00016.50
7.4.270.0000.00816.54
7.4.260.0030.00313.28
7.4.250.0030.00316.59
7.4.240.0030.00316.45
7.4.230.0030.00316.68
7.4.220.0030.00316.38
7.4.210.0060.01016.63
7.4.200.0030.00316.52
7.4.130.0090.01216.52
7.4.120.0110.00616.57
7.4.110.0200.00016.51
7.4.100.0060.01016.32
7.4.90.0080.00816.54
7.4.80.0070.01719.39
7.4.70.0100.00716.61
7.4.60.0050.01016.49
7.4.50.0060.00816.40
7.4.40.0110.00616.63
7.4.30.0090.01016.45
7.4.20.0090.01316.57
7.4.10.0060.01616.31
7.4.00.0060.01016.47
7.3.330.0060.00316.35
7.3.320.0030.00313.45
7.3.310.0080.00016.34
7.3.300.0060.00016.39
7.3.290.0100.00616.35
7.3.280.0090.00616.37
7.3.260.0100.01316.73
7.3.240.0100.00816.55
7.3.230.0110.00616.55
7.3.210.0060.01016.36
7.3.200.0060.01016.36
7.3.190.0130.01016.55
7.3.180.0100.00716.50
7.3.170.0070.01016.47
7.3.160.0120.01216.37
7.3.150.0030.01416.47
7.3.140.0100.01116.63
7.3.130.0140.00716.54
7.3.120.0080.00816.24
7.3.110.0070.01116.32
7.3.100.0070.01016.53
7.3.90.0210.00016.29
7.3.80.0130.00916.41
7.3.70.0130.00916.17
7.3.60.0090.01316.40
7.3.50.0080.01416.43
7.3.40.0090.00616.30
7.3.30.0180.00316.22
7.3.20.0070.01116.32
7.3.10.0120.00616.21
7.3.00.0130.01016.31
7.2.330.0110.00716.65
7.2.320.0160.00016.46
7.2.310.0130.00316.81
7.2.300.0100.01316.84
7.2.290.0040.01316.83
7.2.280.0080.00816.48
7.2.270.0190.00316.68
7.2.260.0030.01916.79
7.2.250.0140.00316.61
7.2.240.0130.00716.64
7.2.230.0090.00916.63
7.2.220.0190.00316.59
7.2.210.0000.02316.54
7.2.200.0160.00716.52
7.2.190.0170.00616.66
7.2.180.0060.00916.46
7.2.170.0030.01516.62
7.2.160.0170.00016.65
7.2.150.0380.00316.69
7.2.140.0060.01116.74
7.2.130.0120.00916.56
7.2.120.0060.01516.61
7.2.110.0040.01916.50
7.2.100.0090.01316.47
7.2.90.0060.01116.59
7.2.80.0120.00416.71
7.2.70.0030.01316.63
7.2.60.0090.00916.53
7.2.50.0080.00816.32
7.2.40.0110.00616.59
7.2.30.0120.00816.66
7.2.20.0130.00716.66
7.2.10.0120.00916.45
7.2.00.0090.00916.62

preferences:
35.01 ms | 403 KiB | 5 Q