3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar1 = array( (object) array('id' => '1505', 'category' => 'blue'), (object) array('id' => '1805', 'category' => 'red') ); $ar2 = array( '1777' => (object) array('id' => '1505', 'category' => 'yellow'), '1877' => (object) array('id' => '1507', 'category' => 'blue'), ); $ids = array_column($ar1, 'id'); $ar3 = array_merge_recursive($ar1, array_filter($ar2, function($x) use ($ids) { return !in_array($x->id, $ids); })); print_r($ar3);

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.4.140.0130.00817.70
8.4.130.0150.00617.63
8.4.120.0100.00920.55
8.4.110.0090.00222.50
8.4.100.0060.01217.86
8.4.90.0130.00818.80
8.4.80.0140.00717.93
8.4.70.0090.00418.27
8.4.60.0140.00618.70
8.4.50.0140.00718.13
8.4.40.0060.00919.55
8.4.30.0130.00720.44
8.4.20.0090.01220.59
8.4.10.0160.00317.61
8.3.270.0090.01016.61
8.3.260.0150.00516.48
8.3.250.0110.00719.03
8.3.240.0120.00717.39
8.3.230.0110.00916.80
8.3.220.0100.01017.20
8.3.210.0070.00816.85
8.3.200.0040.00416.71
8.3.190.0130.00716.65
8.3.180.0080.00616.63
8.3.170.0040.00416.53
8.3.160.0100.00716.55
8.3.150.0060.01217.07
8.3.140.0140.00416.69
8.3.130.0080.00018.56
8.3.120.0030.00620.92
8.3.110.0040.00420.94
8.3.100.0110.00024.06
8.3.90.0040.00426.77
8.3.80.0040.00417.97
8.3.70.0090.00616.48
8.3.60.0120.00918.14
8.3.50.0070.01018.37
8.3.40.0100.00518.84
8.3.30.0120.00318.73
8.3.20.0040.00420.90
8.3.10.0070.00023.48
8.3.00.0040.00423.61
8.2.290.0040.00420.30
8.2.280.0090.00418.24
8.2.270.0000.01816.64
8.2.260.0100.00716.83
8.2.250.0000.01518.80
8.2.240.0000.00917.17
8.2.230.0050.00522.58
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0050.00518.41
8.2.190.0060.00920.37
8.2.180.0070.01116.75
8.2.170.0040.01122.96
8.2.160.0110.00422.25
8.2.150.0040.00424.18
8.2.140.0070.00324.66
8.2.130.0040.00418.09
8.2.120.0140.00026.35
8.2.110.0110.00719.26
8.2.100.0120.00017.84
8.2.90.0030.00618.34
8.2.80.0080.00017.97
8.2.70.0040.00417.93
8.2.60.0070.00018.22
8.2.50.0080.00018.10
8.2.40.0000.00819.32
8.2.30.0040.00419.29
8.2.20.0040.00418.12
8.2.10.0060.00319.30
8.2.00.0040.00419.14
8.1.330.0090.01021.80
8.1.320.0060.00216.43
8.1.310.0070.00718.44
8.1.300.0060.00320.29
8.1.290.0060.00330.84
8.1.280.0030.01225.92
8.1.270.0030.00518.87
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0000.01119.43
8.1.230.0040.00721.03
8.1.220.0090.00017.77
8.1.210.0050.00518.99
8.1.200.0040.00417.35
8.1.190.0000.00817.25
8.1.180.0030.00518.10
8.1.170.0040.00418.50
8.1.160.0060.00318.87
8.1.150.0050.00218.82
8.1.140.0040.00422.09
8.1.130.0000.00717.49
8.1.120.0020.00517.50
8.1.110.0030.00517.46
8.1.100.0040.00417.34
8.1.90.0040.00417.50
8.1.80.0050.00217.35
8.1.70.0000.00817.38
8.1.60.0030.00517.48
8.1.50.0040.00417.59
8.1.40.0040.00417.58
8.1.30.0040.00417.49
8.1.20.0060.00317.64
8.1.10.0040.00417.59
8.1.00.0040.00417.51
8.0.300.0040.00420.03
8.0.290.0070.00016.88
8.0.280.0000.00718.43
8.0.270.0030.00317.26
8.0.260.0000.00716.87
8.0.250.0070.00016.91
8.0.240.0040.00416.91
8.0.230.0000.00716.88
8.0.220.0040.00416.97
8.0.210.0000.00716.94
8.0.200.0030.00316.98
8.0.190.0030.00517.07
8.0.180.0040.00416.90
8.0.170.0120.00016.94
8.0.160.0030.00516.89
8.0.150.0030.01016.89
8.0.140.0030.00316.93
8.0.130.0000.00513.44
8.0.120.0020.00516.91
8.0.110.0000.00716.83
8.0.100.0030.00516.85
8.0.90.0070.00017.05
8.0.80.0050.01316.90
8.0.70.0000.00716.95
8.0.60.0040.00416.79
8.0.50.0040.00416.81
8.0.30.0130.01116.91
8.0.20.0150.00617.28
8.0.10.0110.00817.13
8.0.00.0110.00616.84
7.4.330.0050.00015.55
7.4.320.0040.00416.52
7.4.300.0030.00316.45
7.4.290.0050.00316.39
7.4.280.0030.00516.45
7.4.270.0030.00316.40
7.4.260.0030.00316.46
7.4.250.0040.00416.54
7.4.240.0030.00416.53
7.4.230.0070.00016.63
7.4.220.0000.00816.65
7.4.210.0080.00916.57
7.4.200.0070.00016.64
7.4.160.0080.01316.50
7.4.150.0150.01216.46
7.4.140.0120.00817.64
7.4.130.0120.00716.64
7.4.120.0130.00616.51
7.4.110.0050.01416.51
7.4.100.0090.01316.57
7.4.90.0130.00516.35
7.4.80.0100.00717.91
7.4.70.0150.00316.40
7.4.60.0120.00516.38
7.4.50.0090.00816.47
7.4.40.0100.01016.53
7.4.30.0040.01216.33
7.4.20.0110.01116.41
7.4.10.0110.01116.41
7.4.00.0050.01015.86
7.3.330.0050.00013.23
7.3.320.0060.00013.32
7.3.310.0000.00916.18
7.3.300.0080.00016.30
7.3.290.0030.00316.37
7.3.280.0140.00416.33
7.3.270.0240.00316.36
7.3.260.0150.01116.32
7.3.250.0180.00016.28
7.3.240.0070.01016.36
7.3.230.0100.00816.45
7.3.220.0120.00916.28
7.3.210.0110.00816.42
7.3.200.0090.01216.44
7.3.190.0140.00716.31
7.3.180.0100.00716.41
7.3.170.0100.01016.48
7.3.160.0110.00716.33
7.3.150.0100.00816.23
7.3.140.0050.01616.28
7.3.130.0030.01416.27
7.3.120.0110.01015.55
7.3.110.0070.01315.41
7.3.100.0100.00915.37
7.3.90.0130.00915.62
7.3.80.0100.00915.74
7.3.70.0070.01215.59
7.3.60.0120.00915.59
7.3.50.0100.00915.38
7.3.40.0120.00715.60
7.3.30.0090.00815.63
7.3.20.0120.00916.47
7.3.10.0120.00816.48
7.3.00.0620.00815.81
7.2.340.0130.01416.41
7.2.330.0100.01216.57
7.2.320.0160.00716.66
7.2.310.0170.00816.45
7.2.300.0120.00916.57
7.2.290.0080.01316.49
7.2.280.0160.01216.44
7.2.270.0190.01116.43
7.2.260.0190.01316.41
7.2.250.0120.01216.42
7.2.240.0130.00615.80
7.2.230.0200.00315.83
7.2.220.0130.00815.75
7.2.210.0130.00815.66
7.2.200.0150.00715.85
7.2.190.0140.00615.60
7.2.180.0140.00815.74
7.2.170.0120.01215.91
7.2.160.0100.01015.82
7.2.150.0160.00516.69
7.2.140.0120.00816.85
7.2.130.0860.00916.21
7.2.120.0630.01016.10
7.2.110.0800.00916.21
7.2.100.0830.00716.30
7.2.90.0820.00716.18
7.2.80.0860.00616.29
7.2.70.0800.00416.18
7.2.60.0690.00916.21
7.2.50.1210.01616.11
7.2.40.0820.01216.26
7.2.30.0810.01016.27
7.2.20.0860.01116.33
7.2.10.0700.01216.34
7.2.00.0990.01216.16
7.1.330.0120.00915.65
7.1.320.0150.00515.76
7.1.310.0100.00515.53
7.1.300.0090.00915.63
7.1.290.0200.00315.57
7.1.280.0120.00715.68
7.1.270.0120.00915.79
7.1.260.0120.00815.74
7.1.250.0680.00515.12
7.1.240.0280.00815.54
7.1.230.0150.01115.59
7.1.220.0140.01015.53
7.1.210.0170.00915.53
7.1.200.0220.00915.53
7.1.190.0240.00315.52
7.1.180.0140.01515.51
7.1.170.0160.01115.52
7.1.160.0130.01715.49
7.1.150.0190.00615.46
7.1.140.0220.01015.49
7.1.130.0170.01715.57
7.1.120.0210.00615.59
7.1.110.0200.01015.45
7.1.100.0150.01215.40
7.1.90.0220.01015.45
7.1.80.0140.01115.52
7.1.70.0170.01315.28
7.1.60.0160.00915.48
7.1.50.0210.00215.46
7.1.40.0130.00915.53
7.1.30.0250.00315.47
7.1.20.0160.00815.42
7.1.10.0180.00915.54
7.1.00.0220.00415.43
7.0.330.0170.00715.18
7.0.320.0220.00015.12
7.0.310.0140.00915.30
7.0.300.0140.00915.19
7.0.290.0110.01915.08
7.0.280.0180.00915.06
7.0.270.0270.00815.14
7.0.260.0920.01215.11
7.0.250.0260.00415.41
7.0.240.0220.00715.21
7.0.230.0210.00715.22
7.0.220.0200.00315.20
7.0.210.0180.00615.23
7.0.200.0210.00815.27
7.0.190.0260.00015.32
7.0.180.0230.00315.12
7.0.170.0190.00615.34
7.0.160.0170.01315.22
7.0.150.0200.01015.25
7.0.140.0220.00015.17
7.0.130.0380.01715.31
7.0.120.0120.01315.17
7.0.110.0220.00415.13
7.0.100.0200.01215.16
7.0.90.0220.00415.14
7.0.80.0160.00815.19
7.0.70.0190.00615.11
7.0.60.0250.01615.23
7.0.50.0080.01615.04
7.0.40.0160.00615.25
7.0.30.0200.00315.23
7.0.20.0230.00015.15
7.0.10.0160.00615.18
7.0.00.0090.01215.13

preferences:
31.49 ms | 403 KiB | 5 Q