3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrayName1 = array( '0' => array('name' => 'steve' ,'age' =>51 ) , '1' => array('name' => 'john' ,'age' =>48 ) , ); $arrayName2 = array( '0' => array('name' => 'Steve' ,'place' =>'downtown' ), '1' => array('name' => 'John' ,'place' =>'New York' ), ); $names2 = array_map('strtolower', array_column($arrayName2, 'name')); $output = array(); foreach ($arrayName1 as $array) { $key = array_search($array['name'], $names2); if ($key !== false) { $output[] = $array + $arrayName2[$key]; } else { $output[] = $array; } } print_r($output);

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.00916.79
8.5.00.0150.00619.89
8.4.150.0010.00214.05
8.4.140.0160.00917.57
8.4.130.0080.00517.65
8.4.120.0110.00920.46
8.4.110.0120.00618.90
8.4.100.0070.00517.69
8.4.90.0160.00517.64
8.4.80.0090.00117.98
8.4.70.0120.00919.68
8.4.60.0130.00717.66
8.4.50.0100.00917.63
8.4.40.0130.00718.69
8.4.30.0030.01620.28
8.4.20.0120.00318.04
8.4.10.0060.00319.29
8.3.280.0100.01220.09
8.3.270.0140.00716.60
8.3.260.0100.01016.70
8.3.250.0110.00720.85
8.3.240.0110.00816.86
8.3.230.0100.00816.61
8.3.220.0060.00516.77
8.3.210.0070.00916.47
8.3.200.0100.00916.61
8.3.190.0120.00716.40
8.3.180.0100.00916.35
8.3.170.0130.00616.72
8.3.160.0090.00917.35
8.3.150.0130.00618.72
8.3.140.0080.00020.81
8.3.130.0060.00318.33
8.3.120.0150.00319.04
8.3.110.0050.00520.94
8.3.100.0030.00616.62
8.3.90.0080.00026.77
8.3.80.0110.00016.72
8.3.70.0150.00318.56
8.3.60.0120.00318.38
8.3.50.0140.00523.50
8.3.40.0120.00321.86
8.3.30.0090.00618.81
8.3.20.0050.00324.18
8.3.10.0000.00724.66
8.3.00.0060.00326.16
8.2.290.0140.00420.82
8.2.280.0070.00518.41
8.2.270.0060.01218.73
8.2.260.0090.00916.56
8.2.250.0030.00518.35
8.2.240.0000.00919.13
8.2.230.0000.00822.58
8.2.220.0030.00624.06
8.2.210.0070.00026.77
8.2.200.0090.00016.75
8.2.190.0120.00916.63
8.2.180.0140.00325.92
8.2.170.0070.00719.12
8.2.160.0070.01022.96
8.2.150.0040.00425.66
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0080.00019.71
8.2.110.0100.00020.47
8.2.100.0070.00417.97
8.2.90.0030.00618.16
8.2.80.0030.00522.17
8.2.70.0040.00417.75
8.2.60.0050.00317.75
8.2.50.0000.00917.88
8.2.40.0080.00020.07
8.2.30.0000.00718.02
8.2.20.0080.00018.11
8.2.10.0050.00319.42
8.2.00.0000.00719.20
8.1.330.0130.00516.85
8.1.320.0090.01015.82
8.1.310.0040.01116.90
8.1.300.0080.00019.45
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0090.00021.96
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00320.77
8.1.230.0040.01022.09
8.1.220.0050.00317.74
8.1.210.0070.00318.77
8.1.200.0090.00017.35
8.1.190.0050.00317.35
8.1.180.0050.00318.10
8.1.170.0040.00418.59
8.1.160.0000.00718.89
8.1.150.0000.00718.94
8.1.140.0040.00418.88
8.1.130.0030.00320.14
8.1.120.0060.00317.38
8.1.110.0050.00217.35
8.1.100.0040.00417.49
8.1.90.0020.00517.30
8.1.80.0000.00817.42
8.1.70.0050.00317.50
8.1.60.0030.00517.61
8.1.50.0080.00017.44
8.1.40.0040.00417.50
8.1.30.0100.00017.64
8.1.20.0040.00417.56
8.1.10.0120.00017.57
8.1.00.0070.00417.33
8.0.300.0000.00720.04
8.0.290.0040.00416.88
8.0.280.0030.00318.48
8.0.270.0030.00317.99
8.0.260.0030.00318.44
8.0.250.0000.00617.05
8.0.240.0000.00816.89
8.0.230.0030.00517.00
8.0.220.0000.00716.93
8.0.210.0000.00716.98
8.0.200.0000.00716.97
8.0.190.0080.00016.98
8.0.180.0000.00716.96
8.0.170.0000.00816.99
8.0.160.0000.00716.98
8.0.150.0070.00016.95
8.0.140.0000.00816.92
8.0.130.0030.00313.45
8.0.120.0070.00016.84
8.0.110.0040.00417.05
8.0.100.0050.00216.88
8.0.90.0000.00816.84
8.0.80.0070.00816.84
8.0.70.0040.00416.95
8.0.60.0040.00416.97
8.0.50.0050.00216.81
8.0.30.0070.01017.13
8.0.20.0120.00717.13
8.0.10.0040.00417.06
8.0.00.0040.01416.84
7.4.330.0040.00015.55
7.4.320.0060.00016.63
7.4.300.0070.00016.52
7.4.290.0040.00416.56
7.4.280.0000.00816.54
7.4.270.0030.00416.61
7.4.260.0050.00013.26
7.4.250.0040.00416.51
7.4.240.0050.00316.65
7.4.230.0030.00316.32
7.4.220.0040.00316.56
7.4.210.0090.00616.60
7.4.200.0030.00316.30
7.4.130.0140.00816.50
7.4.120.0120.00616.43
7.4.110.0070.01116.55
7.4.100.0100.00716.36
7.4.90.0170.00716.46
7.4.80.0110.00716.41
7.4.70.0120.00616.55
7.4.60.0090.00916.38
7.4.50.0150.00616.50
7.4.40.0110.00716.23
7.4.30.0070.01116.32
7.4.20.0120.01216.27
7.4.10.0120.00616.43
7.4.00.0030.01416.25
7.3.330.0020.00516.33
7.3.320.0000.00513.27
7.3.310.0040.00416.47
7.3.300.0070.00016.38
7.3.290.0070.01216.34
7.3.260.0180.00316.36
7.3.240.0120.00616.31
7.3.230.0130.00916.35
7.3.220.0100.01316.34
7.3.210.0100.00716.29
7.3.200.0070.01316.27
7.3.190.0060.01216.38
7.3.180.0140.00816.21
7.3.170.0000.01716.37
7.3.160.0030.01416.61
7.3.150.0140.00516.46
7.3.140.0030.01416.59
7.3.130.0150.00616.57
7.3.120.0060.01216.32
7.3.110.0120.00616.52
7.3.100.0080.01216.47
7.3.90.0070.01016.26
7.3.80.0120.01216.33
7.3.70.0110.01216.30
7.3.60.0100.01316.27
7.3.50.0030.01716.45
7.3.40.0160.00616.32
7.3.30.0120.00616.39
7.3.20.0080.01118.31
7.3.10.0110.00718.07
7.3.00.0160.00418.10
7.2.340.0110.00716.61
7.2.330.0070.01116.57
7.2.320.0040.01416.67
7.2.310.0130.00616.75
7.2.300.0000.01816.72
7.2.290.0070.01016.55
7.2.280.0130.01016.67
7.2.270.0130.00616.75
7.2.260.0030.01916.41
7.2.250.0090.00916.71
7.2.240.0030.01516.54
7.2.230.0060.01516.69
7.2.220.0060.01216.63
7.2.210.0070.01716.60
7.2.200.0120.01216.63
7.2.190.0110.00716.45
7.2.180.0120.00616.64
7.2.170.0080.00816.45
7.2.160.0130.00416.67
7.2.150.0080.01118.47
7.2.140.0040.01418.44
7.2.130.0140.01418.54
7.2.120.0100.01018.37
7.2.110.0140.00718.55
7.2.100.0170.00418.51
7.2.90.0200.00618.48
7.2.80.0150.00618.45
7.2.70.0160.00418.60
7.2.60.0170.00318.45
7.2.50.0140.00618.49
7.2.40.0060.01318.44
7.2.30.0120.00918.39
7.2.20.0160.00318.50
7.2.10.0130.00718.29
7.2.00.0040.01518.44

preferences:
50.36 ms | 403 KiB | 5 Q