3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [1, 2, 3], [1, 3], [1, 2, 4, 3], [1, 3, 4] ]; $result = []; foreach ($array as $row) { $cache = [count($row), $row]; array_splice($row, 1, -1); $key = implode('-', $row); if (!isset($result[$key]) || $cache[0] < $result[$key][0]) { $result[$key] = $cache; } } var_export(array_column($result, 1));

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.20.0130.00421.06
8.5.10.0070.00918.61
8.5.00.0140.01020.04
8.4.170.0080.01323.82
8.4.160.0110.01023.90
8.4.150.0070.00617.84
8.4.140.0130.00717.78
8.4.130.0120.00917.75
8.4.120.0080.01220.42
8.4.110.0110.00922.38
8.4.100.0160.00518.86
8.4.90.0140.00620.39
8.4.80.0110.00618.70
8.4.70.0120.01018.88
8.4.60.0050.00418.80
8.4.50.0080.00717.52
8.4.40.0070.01017.55
8.4.30.0030.00718.88
8.4.20.0130.00619.54
8.4.10.0070.00319.29
8.3.290.0080.00218.29
8.3.280.0030.00014.05
8.3.270.0140.00516.77
8.3.260.0130.00316.44
8.3.250.0080.01119.15
8.3.240.0080.01116.59
8.3.230.0120.00716.53
8.3.220.0080.01019.21
8.3.210.0100.00916.80
8.3.200.0060.00316.44
8.3.190.0060.00616.79
8.3.180.0070.00416.64
8.3.170.0030.00716.70
8.3.160.0030.01116.64
8.3.150.0090.00918.93
8.3.140.0140.00418.82
8.3.130.0070.00716.63
8.3.120.0060.00318.95
8.3.110.0030.00620.94
8.3.100.0150.00424.06
8.3.90.0150.00326.77
8.3.80.0040.00718.21
8.3.70.0070.01118.18
8.3.60.0090.01218.43
8.3.50.0100.00520.15
8.3.40.0110.00419.96
8.3.30.0140.00018.71
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.300.0120.00918.01
8.2.290.0120.00518.69
8.2.280.0140.00421.93
8.2.270.0110.00716.73
8.2.260.0000.00819.11
8.2.250.0040.00416.98
8.2.240.0090.00018.81
8.2.230.0040.00422.58
8.2.220.0030.00537.54
8.2.210.0030.00526.77
8.2.200.0060.00316.63
8.2.190.0160.00616.58
8.2.180.0140.00725.92
8.2.170.0160.00318.86
8.2.160.0100.00722.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00721.00
8.2.110.0090.00020.45
8.2.100.0040.00718.18
8.2.90.0000.00818.33
8.2.80.0060.00317.97
8.2.70.0040.00417.93
8.2.60.0040.00418.22
8.2.50.0000.00918.10
8.2.40.0030.00522.01
8.2.30.0050.00318.23
8.2.20.0000.00820.48
8.2.10.0000.00717.77
8.2.00.0080.00019.16
8.1.340.0140.01217.52
8.1.330.0100.00918.21
8.1.320.0120.00716.23
8.1.310.0150.00316.54
8.1.300.0100.01017.82
8.1.290.0090.00018.88
8.1.280.0140.00725.92
8.1.270.0080.00023.99
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0040.00422.21
8.1.230.0000.01120.60
8.1.220.0000.00717.74
8.1.210.0040.00418.77
8.1.200.0100.00017.50
8.1.190.0080.00017.36
8.1.180.0000.00818.10
8.1.170.0090.00018.78
8.1.160.0000.00718.89
8.1.150.0050.00218.56
8.1.140.0030.00517.33
8.1.130.0040.00417.45
8.1.120.0040.00417.39
8.1.110.0040.00417.38
8.1.100.0040.00417.53
8.1.90.0040.00417.37
8.1.80.0090.00017.51
8.1.70.0030.00317.41
8.1.60.0070.00017.50
8.1.50.0080.00017.55
8.1.40.0030.00617.55
8.1.30.0040.00417.62
8.1.20.0170.00717.63
8.1.10.0210.00317.57
8.1.00.0230.00317.57
8.0.300.0070.00021.48
8.0.290.0030.00516.63
8.0.280.0070.00018.38
8.0.270.0030.00316.83
8.0.260.0070.00016.82
8.0.250.0070.00016.90
8.0.240.0000.00816.85
8.0.230.0030.00316.93
8.0.220.0020.00516.89
8.0.210.0030.00316.96
8.0.200.0070.00016.97
8.0.190.0040.00416.99
8.0.180.0070.00016.84
8.0.170.0030.00516.93
8.0.160.0030.00516.90
8.0.150.0150.00416.81
8.0.140.0120.00616.88
8.0.130.0130.00716.83
8.0.120.0140.00616.84
8.0.110.0090.00916.75
8.0.100.0110.00816.75
8.0.90.0150.00416.94
8.0.80.0170.00316.75
8.0.70.0170.00316.82
8.0.60.0140.00616.77
8.0.50.0150.00416.81
8.0.30.0180.00016.84
8.0.20.0100.00316.84
8.0.10.0140.00517.02
7.4.330.0030.00315.55
7.4.320.0040.00416.52
7.4.300.0030.00316.56
7.4.290.0060.00316.41
7.4.280.0040.00416.54
7.4.270.0190.00316.47
7.4.260.0140.00516.50
7.4.250.0030.00716.47
7.4.240.0120.00016.62
7.4.230.0130.00416.39
7.4.220.0110.00816.41
7.4.210.0120.00216.49
7.4.200.0090.00416.48
7.4.190.0130.00316.55
7.4.180.0120.00616.52
7.4.160.0130.00416.48
7.4.150.0160.00416.55
7.4.140.0070.01516.50
7.4.130.0200.00016.30
7.4.120.0170.00316.55
7.4.110.0060.01316.44
7.4.100.0210.00016.34
7.4.90.0170.00416.31
7.4.80.0110.00616.45
7.4.70.0120.00416.44
7.4.60.0130.00316.37
7.4.50.0140.00616.29
7.4.40.0090.00216.36
7.4.30.0110.00016.36
7.4.20.0100.00316.25
7.4.10.0080.00616.34
7.4.00.0160.00016.48

preferences:
212.96 ms | 403 KiB | 5 Q