3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ary1 = array( array( 'sn' => '123', 'name' => 'whatever', ), array( 'sn' => '234', 'name' => 'whatever', ), ); $ary2 = array( array( 'sn' => '123', 'gender' => 'male', ), array( 'sn' => '234', 'gender' => 'female', ), ); $res = []; foreach (array_merge($ary1, $ary2) as $a) { $res[$a['sn']] = (count($res[$a['sn']])) ? array_merge($res[$a['sn']], $a) : $a; } var_dump($res);

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.3.60.0150.00016.63
8.3.50.0160.00821.03
8.3.40.0140.00318.76
8.3.30.0110.00418.57
8.3.20.0070.00020.15
8.3.10.0000.00823.39
8.3.00.0000.00919.91
8.2.180.0140.00318.51
8.2.170.0100.00722.96
8.2.160.0140.00020.39
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00019.32
8.2.120.0040.00426.35
8.2.110.0060.00320.85
8.2.100.0080.00417.97
8.2.90.0040.00419.39
8.2.80.0000.00917.97
8.2.70.0080.00417.61
8.2.60.0040.00417.91
8.2.50.0100.00018.07
8.2.40.0080.00022.25
8.2.30.0000.00720.68
8.2.20.0000.00717.79
8.2.10.0050.00318.05
8.2.00.0070.00018.10
8.1.280.0070.00725.92
8.1.270.0030.00620.20
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0060.00322.25
8.1.230.0070.00418.91
8.1.220.0030.00617.78
8.1.210.0040.00418.77
8.1.200.0050.00517.23
8.1.190.0030.00519.01
8.1.180.0080.00018.10
8.1.170.0030.00518.58
8.1.160.0040.00420.77
8.1.150.0040.00418.91
8.1.140.0040.00419.57
8.1.130.0030.00517.79
8.1.120.0040.00417.53
8.1.110.0000.00717.36
8.1.100.0050.00317.42
8.1.90.0040.00417.48
8.1.80.0040.00417.47
8.1.70.0000.00717.45
8.1.60.0070.00017.45
8.1.50.0060.00317.57
8.1.40.0000.00817.40
8.1.30.0030.00517.64
8.1.20.0000.00817.68
8.1.10.0000.00717.59
8.1.00.0050.00217.47
8.0.300.0020.00518.77
8.0.290.0000.00716.75
8.0.280.0070.00018.40
8.0.270.0040.00417.23
8.0.260.0030.00317.19
8.0.250.0000.00817.00
8.0.240.0000.00616.97
8.0.230.0040.00416.98
8.0.220.0000.00716.82
8.0.210.0040.00416.96
8.0.200.0000.00616.89
8.0.190.0060.00317.00
8.0.180.0080.00016.86
8.0.170.0040.00417.01
8.0.160.0060.00316.88
8.0.150.0060.00316.91
8.0.140.0070.00016.89
8.0.130.0060.00013.43
8.0.120.0040.00416.90
8.0.110.0070.00016.78
8.0.100.0030.00516.91
8.0.90.0040.00417.02
8.0.80.0120.00317.00
8.0.70.0040.00416.92
8.0.60.0000.00816.93
8.0.50.0000.00716.82
8.0.30.0140.00517.00
8.0.20.0120.00717.40
8.0.10.0000.00816.96
8.0.00.0090.01016.71
7.4.330.0000.00616.77
7.4.320.0030.00316.59
7.4.300.0000.00716.58
7.4.290.0070.00016.44
7.4.280.0030.00616.51
7.4.270.0070.00016.58
7.4.260.0070.00316.57
7.4.250.0000.00816.48
7.4.240.0030.00316.60
7.4.230.0030.00316.62
7.4.220.0140.00416.53
7.4.210.0060.01016.55
7.4.200.0000.00716.33
7.4.160.0110.01116.53
7.4.150.0120.00617.40
7.4.140.0140.00717.86
7.4.130.0110.00916.51
7.4.120.0110.00716.39
7.4.110.0090.00916.64
7.4.100.0140.00716.53
7.4.90.0090.00916.32
7.4.80.0070.01419.39
7.4.70.0080.00816.47
7.4.60.0070.01016.56
7.4.50.0040.01116.33
7.4.40.0100.00716.77
7.4.30.0110.00716.41
7.4.00.0050.01315.05
7.3.330.0030.00313.20
7.3.320.0000.00513.27
7.3.310.0060.00316.42
7.3.300.0030.00316.10
7.3.290.0000.00816.26
7.3.280.0090.00716.32
7.3.270.0190.00617.40
7.3.260.0100.00716.43
7.3.250.0160.00516.43
7.3.240.0090.01116.46
7.3.230.0150.00416.39
7.3.210.0170.00016.27
7.3.200.0120.00916.55
7.3.190.0090.01216.34
7.3.180.0090.00616.46
7.3.170.0110.01316.40
7.3.160.0070.01016.29
7.3.120.0060.01214.98
7.3.110.0030.01514.86
7.3.100.0060.01014.44
7.3.90.0120.00614.79
7.3.80.0000.01514.63
7.3.70.0040.01114.83
7.3.60.0030.01014.83
7.3.50.0030.01014.47
7.3.40.0100.00314.57
7.3.30.0070.00714.89
7.3.20.0120.00316.71
7.3.10.0090.00516.65
7.3.00.0080.00516.64
7.2.330.0070.01116.69
7.2.320.0140.01016.76
7.2.310.0120.00616.64
7.2.300.0030.01316.54
7.2.290.0070.01016.72
7.2.250.0070.01415.03
7.2.240.0100.01014.96
7.2.230.0070.01414.98
7.2.220.0000.01514.70
7.2.210.0100.00314.79
7.2.200.0070.00714.95
7.2.190.0090.00615.14
7.2.180.0070.00715.07
7.2.170.0060.00615.14
7.2.130.0080.00516.92
7.2.120.0060.00617.03
7.2.110.0020.00816.95
7.2.100.0040.01016.72
7.2.90.0050.00417.00
7.2.80.0090.00316.87
7.2.70.0110.00516.89
7.2.60.0010.01116.85
7.2.50.0090.00616.90
7.2.40.0080.00817.04
7.2.30.0060.00516.94
7.2.20.0030.01017.10
7.2.10.0060.00716.88
7.2.00.0060.00617.72
7.1.330.0070.00715.81
7.1.320.0090.00315.77
7.1.310.0030.00715.56
7.1.300.0040.01215.73
7.1.290.0070.00815.52
7.1.280.0090.00315.75
7.1.270.0060.00615.51
7.1.260.0030.01515.84
7.1.250.0030.00815.78
7.1.200.0080.00315.89
7.1.100.0060.00617.88
7.1.70.0110.00317.12
7.1.60.0130.01019.52
7.1.50.0130.00916.96
7.1.00.0070.07322.48
7.0.200.0050.00516.80
7.0.60.0070.08320.00
7.0.50.0030.05017.81
7.0.40.0130.07720.30
7.0.30.0200.05320.34
7.0.20.0230.06320.04
7.0.10.0100.08020.33
7.0.00.0030.04719.99
5.6.280.0000.03321.11
5.6.210.0200.04320.53
5.6.200.0030.05018.18
5.6.190.0130.07320.45
5.6.180.0270.07020.56
5.6.170.0200.08720.34
5.6.160.0130.07020.50
5.6.150.0100.08018.11
5.6.140.0100.07718.14
5.6.130.0070.08018.09
5.6.120.0130.07721.03
5.6.110.0000.04320.98
5.6.100.0100.08021.10
5.6.90.0100.07720.99
5.6.80.0000.05020.38
5.5.350.0300.07020.32
5.5.340.0200.07018.00
5.5.330.0000.05320.40
5.5.320.0670.06720.24
5.5.310.0270.07320.18
5.5.300.0030.06317.91
5.5.290.0030.04717.97
5.5.280.0070.07320.87
5.5.270.0070.05020.86
5.5.260.0030.06020.80
5.5.250.0030.08720.50
5.5.240.0300.07020.16

preferences:
48.73 ms | 401 KiB | 5 Q