3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ [10, 'Some Name..'], [11, 'Some Name..'], [13, 'Some Name..'], ]; $array2 = [ [13, 'Viewed'] ]; $result = []; foreach (array_merge($array1, $array2) as [$id, $value]) { $result[$id][0] = $id; $result[$id][] = $value; } var_export($result);

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.0150.00318.30
8.5.00.0110.01019.73
8.4.160.0120.00823.98
8.4.150.0020.00114.05
8.4.140.0160.00517.38
8.4.130.0100.00718.47
8.4.120.0120.00724.20
8.4.110.0070.00222.59
8.4.100.0120.00717.70
8.4.90.0140.00618.63
8.4.80.0030.00617.63
8.4.70.0120.00717.72
8.4.60.0100.00918.70
8.4.50.0130.00818.41
8.4.40.0060.00317.71
8.4.30.0080.00020.45
8.4.20.0130.00919.66
8.4.10.0000.00822.16
8.3.280.0110.00920.66
8.3.270.0100.01116.73
8.3.260.0070.00416.45
8.3.250.0090.00918.71
8.3.240.0080.01016.62
8.3.230.0160.00316.63
8.3.220.0050.00417.17
8.3.210.0150.00418.39
8.3.200.0040.00516.86
8.3.190.0050.00417.23
8.3.180.0100.00916.56
8.3.170.0080.00017.28
8.3.160.0070.01119.95
8.3.150.0000.00818.64
8.3.140.0110.00717.11
8.3.130.0050.00316.81
8.3.120.0060.00320.94
8.3.110.0110.00416.29
8.3.100.0100.00018.31
8.3.90.0120.00318.50
8.3.80.0100.00317.97
8.3.70.0070.00718.55
8.3.60.0090.00618.43
8.3.50.0070.01116.55
8.3.40.0070.00722.03
8.3.30.0070.00719.04
8.3.20.0070.01024.18
8.3.10.0040.00424.66
8.3.00.0060.00326.16
8.2.290.0050.00420.55
8.2.280.0060.00518.18
8.2.270.0080.01218.97
8.2.260.0050.00316.43
8.2.250.0030.00517.25
8.2.240.0040.00419.15
8.2.230.0040.00420.94
8.2.220.0040.01124.06
8.2.210.0040.00426.77
8.2.200.0030.00616.38
8.2.190.0110.00318.54
8.2.180.0040.01116.50
8.2.170.0030.01618.92
8.2.160.0070.00722.96
8.2.150.0090.00625.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00418.05
8.2.110.0060.00322.24
8.2.100.0070.00417.91
8.2.90.0240.00817.56
8.2.80.0270.00617.38
8.2.70.0230.01017.24
8.2.60.0280.00617.38
8.2.50.0210.00917.44
8.2.40.0260.00317.44
8.2.30.0290.00017.44
8.2.20.0130.00818.47
8.2.10.0200.00617.44
8.2.00.0190.00917.44
8.1.330.0140.00521.86
8.1.320.0100.01016.15
8.1.310.0050.00318.33
8.1.300.0060.00318.34
8.1.290.0060.00318.88
8.1.280.0090.00925.92
8.1.270.0080.00024.66
8.1.260.0140.00326.35
8.1.250.0180.00028.09
8.1.240.0050.00323.98
8.1.230.0030.00722.08
8.1.220.0280.00417.31
8.1.210.0230.00817.19
8.1.200.0190.00318.18
8.1.190.0170.00617.17
8.1.180.0160.00517.24
8.1.170.0160.00517.23
8.1.160.0170.00417.17
8.1.150.0180.00518.19
8.1.140.0150.00318.19
8.1.130.0150.00418.22
8.1.120.0180.00218.25
8.1.110.0180.00817.31
8.1.100.0200.00817.17
8.1.90.0230.00717.19
8.1.80.0220.00717.19
8.1.70.0230.00517.23
8.1.60.0220.00517.36
8.1.50.0280.00017.13
8.1.40.0190.00917.37
8.1.30.0270.00217.31
8.1.20.0280.00217.25
8.1.10.0220.00617.35
8.1.00.0210.00917.23
8.0.300.0230.00616.80
8.0.290.0260.00416.80
8.0.280.0230.00516.80
8.0.270.0240.00416.80
8.0.260.0240.00416.80
8.0.250.0210.00716.80
8.0.240.0240.00616.80
8.0.230.0230.00716.83
8.0.220.0270.00516.80
8.0.210.0250.00416.80
8.0.200.0280.00116.80
8.0.190.0240.00316.80
8.0.180.0220.00716.80
8.0.170.0230.00416.80
8.0.160.0290.00316.80
8.0.150.0160.01216.80
8.0.140.0250.00416.80
8.0.130.0260.00316.80
8.0.120.0190.00816.80
8.0.110.0220.00716.80
8.0.100.0240.00616.80
8.0.90.0250.00416.80
8.0.80.0240.00516.80
8.0.70.0220.00816.80
8.0.60.0260.00216.80
8.0.50.0250.00416.80
8.0.30.0220.00516.80
8.0.20.0220.00516.80
8.0.10.0220.00516.80

preferences:
102.52 ms | 403 KiB | 5 Q