3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array( array("id" => "1","name"=>"John"), array("id" => "2","name"=>"Peter"), array("id" => "3","name"=>"Tom"), array("id" => "12","name"=>"Astro") ); $array2 = array( array("id" => "1","second_name"=>"Lim"), array("id" => "2","second_name"=>"Parker"), array("id" => "3","second_name"=>"PHP") ); $result = array_column($array1, null, 'id'); foreach ($array2 as $row) { $result[$row['id']]['second_name'] = $row['second_name']; } var_export(array_values($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.00.0130.00819.59
8.4.150.0010.00114.05
8.4.140.0120.01017.68
8.4.130.0130.00819.35
8.4.120.0110.00920.56
8.4.110.0120.00822.30
8.4.100.0100.00918.79
8.4.90.0150.00518.91
8.4.80.0120.00818.62
8.4.70.0060.00418.04
8.4.60.0140.00718.80
8.4.50.0080.01222.13
8.4.40.0030.00517.63
8.4.30.0180.00020.46
8.4.20.0140.00318.97
8.4.10.0040.00422.01
8.3.280.0110.00918.42
8.3.270.0070.01216.72
8.3.260.0160.00416.73
8.3.250.0130.00518.89
8.3.240.0120.00217.28
8.3.230.0130.00716.72
8.3.220.0040.00418.97
8.3.210.0090.00916.71
8.3.200.0060.00316.61
8.3.190.0010.00719.03
8.3.180.0130.00618.73
8.3.170.0100.01017.11
8.3.160.0110.00716.86
8.3.150.0110.00716.95
8.3.140.0110.00716.52
8.3.130.0030.00516.71
8.3.120.0150.00018.64
8.3.110.0030.00620.94
8.3.100.0040.00424.06
8.3.90.0000.00826.77
8.3.80.0040.00718.55
8.3.70.0200.00918.26
8.3.60.0210.00918.08
8.3.50.0110.00619.03
8.3.40.0170.00619.19
8.3.30.0210.00718.26
8.3.20.0180.00721.08
8.3.10.0190.00721.32
8.3.00.0140.01022.06
8.2.290.0120.00720.34
8.2.280.0110.00418.57
8.2.270.0060.01216.62
8.2.260.0140.00417.36
8.2.250.0040.01518.56
8.2.240.0040.00817.12
8.2.230.0050.00322.58
8.2.220.0130.00337.54
8.2.210.0040.00426.77
8.2.200.0030.00616.38
8.2.190.0220.00817.30
8.2.180.0210.01021.95
8.2.170.0240.00718.46
8.2.160.0180.00720.47
8.2.150.0220.00521.82
8.2.140.0210.00621.32
8.2.130.0140.00222.06
8.2.120.0120.00318.90
8.2.110.0130.00319.49
8.2.100.0150.00417.94
8.2.90.0110.00318.16
8.2.80.0150.00318.93
8.2.70.0170.00517.86
8.2.60.0110.00417.86
8.2.50.0090.00717.76
8.2.40.0210.00418.72
8.2.30.0140.01117.86
8.2.20.0220.00318.58
8.2.10.0200.00518.04
8.2.00.0180.00818.69
8.1.330.0150.00521.89
8.1.320.0130.00617.77
8.1.310.0000.01016.61
8.1.300.0120.00617.79
8.1.290.0090.00018.88
8.1.280.0120.00721.95
8.1.270.0250.00820.91
8.1.260.0250.00322.16
8.1.250.0190.00523.03
8.1.240.0100.01120.94
8.1.230.0120.00919.43
8.1.220.0130.00617.85
8.1.210.0170.00618.37
8.1.200.0160.00417.66
8.1.190.0140.00917.66
8.1.180.0220.00618.03
8.1.170.0060.00818.50
8.1.160.0130.00418.43
8.1.150.0130.00418.26
8.1.140.0130.00517.69
8.1.130.0140.00518.44
8.1.120.0100.00717.71
8.1.110.0090.00617.71
8.1.100.0130.00617.67
8.1.90.0160.00317.68
8.1.80.0130.00417.66
8.1.70.0150.00217.69
8.1.60.0180.00317.77
8.1.50.0180.00717.75
8.1.40.0240.00717.71
8.1.30.0200.01117.81
8.1.20.0250.00617.85
8.1.10.0170.00517.70
8.1.00.0210.00517.72
8.0.300.0190.00419.00
8.0.290.0130.00517.36
8.0.280.0150.00417.98
8.0.270.0160.00417.92
8.0.260.0120.00718.21
8.0.250.0190.00417.46
8.0.240.0200.00317.45
8.0.230.0220.00417.43
8.0.220.0140.01317.41
8.0.210.0200.01117.45
8.0.200.0230.00517.36
8.0.190.0120.00917.39
8.0.180.0170.00217.43
8.0.170.0110.00817.44
8.0.160.0150.00517.38
8.0.150.0140.00517.30
8.0.140.0150.00217.36
8.0.130.0140.00417.37
8.0.120.0200.00317.39
8.0.110.0100.01017.41
8.0.100.0150.00517.38
8.0.90.0140.00317.42
8.0.80.0140.00517.42
8.0.70.0110.00717.43
8.0.60.0090.00917.43
8.0.50.0180.00317.40
8.0.30.0140.00617.43
8.0.20.0150.00417.44
8.0.10.0160.00217.46
7.4.330.0070.00616.76
7.4.320.0090.00517.31
7.4.300.0130.00517.25
7.4.290.0110.00717.19
7.4.280.0180.00017.29
7.4.270.0100.00817.19
7.4.260.0130.00617.27
7.4.250.0150.00517.23
7.4.240.0130.00617.26
7.4.230.0160.00317.24
7.4.220.0160.00117.21
7.4.210.0130.00517.24
7.4.200.0110.00617.29
7.4.190.0100.00817.26
7.4.180.0100.00617.23
7.4.160.0150.00517.27
7.4.150.0140.00417.24
7.4.140.0130.00417.14
7.4.130.0110.00617.21
7.4.120.0160.00417.17
7.4.110.0130.00617.22
7.4.100.0120.00417.25
7.4.90.0110.00517.14
7.4.80.0160.00117.17
7.4.70.0110.00717.18
7.4.60.0150.00417.17
7.4.50.0170.00117.13
7.4.40.0110.00717.18
7.4.30.0150.00617.19
7.4.20.0160.00117.19
7.4.10.0150.00217.22
7.4.00.0120.00717.21

preferences:
28.79 ms | 403 KiB | 5 Q