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']] = (isset($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.0060.01116.75
8.3.50.0170.00522.06
8.3.40.0130.00718.49
8.3.30.0140.00018.71
8.3.20.0040.00420.35
8.3.10.0080.00023.51
8.3.00.0080.00019.97
8.2.180.0070.01416.50
8.2.170.0070.01022.96
8.2.160.0060.01220.43
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0080.00019.46
8.2.120.0080.00026.35
8.2.110.0060.00320.52
8.2.100.0070.00418.03
8.2.90.0000.00819.30
8.2.80.0080.00017.97
8.2.70.0040.00417.50
8.2.60.0040.00418.04
8.2.50.0060.00318.07
8.2.40.0040.00422.20
8.2.30.0040.00420.62
8.2.20.0000.00717.56
8.2.10.0020.00518.10
8.2.00.0070.00018.09
8.1.280.0140.00325.92
8.1.270.0040.00420.35
8.1.260.0050.00328.09
8.1.250.0070.00028.09
8.1.240.0000.00922.14
8.1.230.0110.00017.66
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0090.00017.35
8.1.190.0040.00417.36
8.1.180.0040.00418.10
8.1.170.0040.00418.59
8.1.160.0000.00820.61
8.1.150.0070.00018.91
8.1.140.0000.00819.48
8.1.130.0030.00317.69
8.1.120.0030.00517.48
8.1.110.0050.00317.48
8.1.100.0000.00717.34
8.1.90.0000.00717.46
8.1.80.0040.00417.48
8.1.70.0000.00717.32
8.1.60.0050.00317.45
8.1.50.0030.00517.48
8.1.40.0040.00417.43
8.1.30.0080.00017.62
8.1.20.0050.00217.47
8.1.10.0040.00417.57
8.1.00.0000.00817.43
8.0.300.0060.00318.77
8.0.290.0030.00616.75
8.0.280.0030.00318.48
8.0.270.0080.00017.23
8.0.260.0030.00517.21
8.0.250.0030.00316.84
8.0.240.0060.00016.84
8.0.230.0000.00716.95
8.0.220.0040.00416.92
8.0.210.0030.00516.79
8.0.200.0030.00316.98
8.0.190.0030.00516.98
8.0.180.0000.00716.92
8.0.170.0030.00516.86
8.0.160.0120.00016.88
8.0.150.0080.00316.71
8.0.140.0000.00716.89
8.0.130.0030.00313.39
8.0.120.0000.00916.83
8.0.110.0040.00416.86
8.0.100.0050.00316.74
8.0.90.0040.00416.76
8.0.80.0090.01216.79
8.0.70.0000.00716.93
8.0.60.0040.00417.00
8.0.50.0040.00416.95
8.0.30.0080.00916.87
8.0.20.0140.00617.40
8.0.10.0000.00716.96
8.0.00.0090.01016.83
7.4.330.0000.00516.79
7.4.320.0060.00016.58
7.4.300.0000.00716.58
7.4.290.0000.00716.60
7.4.280.0060.00316.63
7.4.270.0070.00016.39
7.4.260.0000.00916.49
7.4.250.0000.00716.56
7.4.240.0020.00516.50
7.4.230.0030.00316.49
7.4.220.0140.00416.39
7.4.210.0080.00716.63
7.4.200.0030.00316.70
7.4.160.0060.01116.52
7.4.150.0130.00417.40
7.4.140.0100.01017.86
7.4.130.0120.00716.37
7.4.120.0110.00916.45
7.4.110.0090.00916.43
7.4.100.0160.00816.41
7.4.90.0080.00816.48
7.4.80.0130.00919.39
7.4.70.0080.00816.39
7.4.60.0160.00016.59
7.4.50.0070.00516.49
7.4.40.0100.00616.60
7.4.30.0100.00716.30
7.4.00.0060.00915.02
7.3.330.0070.00013.16
7.3.320.0030.00313.23
7.3.310.0000.00716.33
7.3.300.0000.00716.35
7.3.290.0000.00716.27
7.3.280.0040.01416.29
7.3.270.0100.01617.40
7.3.260.0100.00716.27
7.3.250.0130.00616.39
7.3.240.0150.00316.33
7.3.230.0030.01216.43
7.3.210.0100.00716.44
7.3.200.0060.01316.17
7.3.190.0030.01416.22
7.3.180.0040.01716.40
7.3.170.0080.01516.45
7.3.160.0070.01016.63
7.3.120.0120.00614.70
7.3.110.0030.01314.64
7.3.100.0040.01114.75
7.3.90.0030.01114.63
7.3.80.0060.00314.80
7.3.70.0070.01014.88
7.3.60.0000.00914.96
7.3.50.0070.00714.93
7.3.40.0030.01114.41
7.3.30.0070.00314.85
7.3.20.0090.00316.92
7.3.10.0090.00616.44
7.3.00.0080.00416.87
7.2.330.0070.01116.74
7.2.320.0000.01716.72
7.2.310.0080.00816.34
7.2.300.0030.01416.70
7.2.290.0080.00816.43
7.2.250.0100.01015.16
7.2.240.0030.01614.74
7.2.230.0000.01015.02
7.2.220.0060.00914.71
7.2.210.0060.01015.07
7.2.200.0100.00315.14
7.2.190.0040.01115.22
7.2.180.0090.00614.95
7.2.170.0000.01014.84
7.2.00.0110.00319.27
7.1.330.0060.00615.54
7.1.320.0030.01015.82
7.1.310.0030.01215.72
7.1.300.0110.00415.92
7.1.290.0070.00715.82
7.1.280.0000.00815.58
7.1.270.0110.00415.53
7.1.260.0110.00315.69
7.1.100.0030.00918.27
7.1.70.0030.00716.76
7.1.60.0130.01019.52
7.1.50.0140.01016.91
7.1.00.0000.08022.27
7.0.200.0080.00016.82
7.0.60.0130.06319.96
7.0.50.0100.05317.89
7.0.40.0030.07319.96
7.0.30.0370.05320.09
7.0.20.0300.07720.30
7.0.10.0100.09020.17
7.0.00.0000.05320.08
5.6.280.0000.03321.04
5.6.210.0130.07720.72
5.6.200.0000.04718.21
5.6.190.0130.07320.43
5.6.180.0230.08020.78
5.6.170.0270.04020.50
5.6.160.0070.05720.46
5.6.150.0070.08318.18
5.6.140.0070.08318.21
5.6.130.0170.06318.16
5.6.120.0070.04020.98
5.6.110.0100.04020.98
5.6.100.0170.04720.97
5.6.90.0070.06721.00
5.6.80.0070.08020.36
5.5.350.0170.08020.41
5.5.340.0200.07017.92
5.5.330.0130.07720.12
5.5.320.0530.07020.19
5.5.310.0200.08320.33
5.5.300.0070.05017.91
5.5.290.0030.05718.01
5.5.280.0030.04320.87
5.5.270.0130.07720.76
5.5.260.0130.07720.79
5.5.250.0070.04020.66
5.5.240.0270.04320.02

preferences:
55.68 ms | 401 KiB | 5 Q