3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ (object) ['id' => 100, 'name' => 'Muhammad'], (object) ['id' => 102, 'name' => 'Ibrahim'], (object) ['id' => 101, 'name' => 'Sumayyah'] ]; $array2 = [ (object) ['id' => 100, 'name' => 'Muhammad'], (object) ['id' => 103, 'name' => 'Yusuf'] ]; $merged_keyed = array_column(array_merge($array1,$array2), NULL, 'id'); ksort($merged_keyed); print_r(array_values($merged_keyed));

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.10.0060.00317.77
8.3.140.0090.00616.58
8.3.130.0040.00416.59
8.3.120.0060.00320.66
8.3.110.0060.00320.94
8.3.100.0040.00418.59
8.3.90.0120.00616.55
8.3.80.0050.00517.97
8.3.70.0110.01118.43
8.3.60.0150.00018.55
8.3.50.0160.00318.24
8.3.40.0090.00918.42
8.3.30.0070.00718.50
8.3.20.0080.00018.90
8.3.10.0050.00822.69
8.3.00.0050.00821.25
8.2.250.0160.00316.74
8.2.240.0040.00716.99
8.2.230.0080.00022.58
8.2.220.0160.00324.06
8.2.210.0040.00426.77
8.2.200.0030.00618.41
8.2.190.0150.00916.63
8.2.180.0060.00918.55
8.2.170.0070.00718.89
8.2.160.0100.00322.96
8.2.150.0050.00324.18
8.2.140.0090.00422.48
8.2.130.0050.00719.99
8.2.120.0080.00622.55
8.2.110.0100.00520.04
8.2.100.0110.00418.47
8.2.90.0100.00318.39
8.2.80.0070.00719.03
8.2.70.0060.00518.20
8.2.60.0040.00418.56
8.2.50.0100.00319.07
8.2.40.0070.00219.99
8.2.30.0040.00919.07
8.2.20.0070.00118.39
8.2.10.0040.00419.36
8.2.00.0030.00519.07
8.1.300.0000.00918.56
8.1.290.0030.00618.88
8.1.280.0090.00925.92
8.1.270.0070.00121.99
8.1.260.0040.00424.04
8.1.250.0110.00225.00
8.1.240.0050.00520.30
8.1.230.0040.00619.77
8.1.220.0050.00918.12
8.1.210.0050.00818.66
8.1.200.0070.00217.93
8.1.190.0030.00517.88
8.1.180.0140.00018.73
8.1.170.0110.00318.49
8.1.160.0060.00218.79
8.1.150.0080.00018.66
8.1.140.0020.00618.04
8.1.130.0080.00518.94
8.1.120.0080.00517.98
8.1.110.0000.00817.98
8.1.100.0020.00617.99
8.1.90.0070.00117.94
8.1.80.0070.00618.04
8.1.70.0070.00718.01
8.1.60.0050.00618.13
8.1.50.0110.00218.05
8.1.40.0060.00618.09
8.1.30.0050.00318.11
8.1.20.0050.00318.16
8.1.10.0050.00418.00
8.1.00.0090.00017.99
8.0.300.0050.00519.08
8.0.290.0090.00717.26
8.0.280.0130.00418.15
8.0.270.0020.00517.28
8.0.260.0080.00217.54
8.0.250.0050.00317.43
8.0.240.0080.00317.46
8.0.230.0070.00417.46
8.0.220.0030.00617.24
8.0.210.0090.00217.35
8.0.200.0050.00317.36
8.0.190.0040.00417.45
8.0.180.0040.00317.41
8.0.170.0080.00317.48
8.0.160.0040.00317.52
8.0.150.0110.00017.32
8.0.140.0120.00817.31
8.0.130.0100.00415.54
8.0.120.0090.00717.44
8.0.110.0050.00517.33
8.0.100.0100.00517.36
8.0.90.0060.00417.18
8.0.80.0080.00317.19
8.0.70.0040.00317.23
8.0.60.0090.00117.24
8.0.50.0090.00117.16
8.0.30.0080.00517.30
8.0.20.0050.00917.33
8.0.10.0030.00617.37
8.0.00.0060.00717.54
7.4.330.0010.00414.99
7.4.320.0110.00016.99
7.4.300.0100.00216.99
7.4.290.0120.00316.87
7.4.280.0130.00517.00
7.4.270.0060.00617.07
7.4.260.0090.00316.88
7.4.250.0070.00617.04
7.4.240.0060.00816.96
7.4.230.0110.00616.96
7.4.220.0070.00416.79
7.4.210.0100.00316.84
7.4.200.0080.00616.69
7.4.190.0060.00517.00
7.4.180.0060.00617.02
7.4.160.0070.00417.06
7.4.150.0070.00516.96
7.4.140.0100.00817.50
7.4.130.0110.00616.71
7.4.120.0110.00816.60
7.4.110.0090.00416.65
7.4.100.0090.00616.76
7.4.90.0070.00816.75
7.4.80.0110.00317.77
7.4.70.0070.00616.77
7.4.60.0080.00516.85
7.4.50.0040.00916.75
7.4.40.0070.00616.75
7.4.30.0090.00216.93
7.4.20.0060.00516.87
7.4.10.0170.00317.05
7.4.00.0120.00715.88
7.3.330.0150.00415.15
7.3.320.0110.00015.21
7.3.310.0160.00216.70
7.3.300.0120.00716.85
7.3.290.0090.00716.49
7.3.280.0130.00516.49
7.3.270.0140.00316.80
7.3.260.0090.00616.44
7.3.250.0100.00216.74
7.3.240.0100.00716.34
7.3.230.0070.00816.71
7.3.220.0150.00616.69
7.3.210.0120.00316.57
7.3.200.0100.00916.62
7.3.190.0150.00216.53
7.3.180.0070.00616.54
7.3.170.0150.00416.82
7.3.160.0130.00616.47
7.3.150.0110.00416.65
7.3.140.0100.00216.74
7.3.130.0120.00016.68
7.3.120.0140.00715.96
7.3.110.0060.00616.15
7.3.100.0120.00815.95
7.3.90.0160.00416.16
7.3.80.0140.00315.92
7.3.70.0130.00616.10
7.3.60.0140.00516.07
7.3.50.0130.00416.02
7.3.40.0130.00515.98
7.3.30.0120.00616.06
7.3.20.0130.00817.21
7.3.10.0120.00417.25
7.3.00.0070.01017.25
7.2.340.0140.00316.74
7.2.330.0090.00916.76
7.2.320.0060.00716.77
7.2.310.0040.01016.75
7.2.300.0110.00616.71
7.2.290.0090.00616.77
7.2.280.0180.00016.67
7.2.270.0080.00416.91
7.2.260.0170.00316.72
7.2.250.0070.00716.17
7.2.240.0110.00316.22
7.2.230.0100.00816.21
7.2.220.0110.00416.22
7.2.210.0100.00716.05
7.2.200.0130.00616.29
7.2.190.0100.00816.19
7.2.180.0130.00516.31
7.2.170.0120.00516.32
7.2.160.0050.00816.37
7.2.150.0060.00817.46
7.2.140.0080.00317.67
7.2.130.0090.00417.75
7.2.120.0140.00417.65
7.2.110.0080.00317.72
7.2.100.0080.00517.58
7.2.90.0140.00417.51
7.2.80.0170.00816.78
7.2.70.0230.00716.54
7.2.60.0270.00916.46
7.2.50.0260.00716.44
7.2.40.0280.00916.54
7.2.30.0300.00616.54
7.2.20.0310.00816.52
7.2.10.0290.00516.58
7.2.00.0200.00916.40
7.1.330.0080.00516.43
7.1.320.0060.00516.48
7.1.310.0100.00516.44
7.1.300.0080.00316.42
7.1.290.0060.00516.45
7.1.280.0090.00316.50
7.1.270.0060.00616.77
7.1.260.0050.00616.48
7.1.250.0100.00616.36
7.1.240.0080.00416.53
7.1.230.0060.01016.44
7.1.220.0080.00816.37
7.1.210.0110.00416.35
7.1.200.0060.00516.29
7.1.190.0130.00615.69
7.1.180.0140.00615.78
7.1.170.0200.00515.32
7.1.160.0350.00615.39
7.1.150.0300.00615.30
7.1.140.0250.00815.37
7.1.130.0240.00615.32
7.1.120.0280.00815.26
7.1.110.0250.00515.37
7.1.100.0230.00915.18
7.1.90.0280.00715.24
7.1.80.0290.00715.32
7.1.70.0310.00615.32
7.1.60.0360.00722.57
7.1.50.0390.01122.59
7.1.40.0310.01222.42
7.1.30.0310.00622.55
7.1.20.0280.00722.42
7.1.10.0190.00715.33
7.1.00.0200.00515.25
7.0.330.0070.00616.05
7.0.320.0080.00416.16
7.0.310.0170.00415.28
7.0.300.0250.00515.02
7.0.290.0150.00515.34
7.0.280.0080.00316.00
7.0.270.0160.00515.39
7.0.260.0150.00615.48
7.0.250.0200.00515.48
7.0.240.0160.00515.48
7.0.230.0140.00715.50
7.0.220.0240.00615.50
7.0.210.0330.00515.45
7.0.200.0130.00515.45
7.0.190.0170.00615.51
7.0.180.0130.00515.56
7.0.170.0180.00415.51
7.0.160.0140.00615.42
7.0.150.0160.00615.43
7.0.140.0120.00515.46
7.0.130.0170.00515.40
7.0.120.0110.00715.51
7.0.110.0120.00615.28
7.0.100.0080.00815.45
7.0.90.0110.00515.44
7.0.80.0090.00715.38
7.0.70.0100.00615.49
7.0.60.0150.00215.36
7.0.50.0090.00715.36
7.0.40.0190.00315.12
7.0.30.0150.00615.16
7.0.20.0110.00415.07
7.0.10.0180.00415.10
7.0.00.0100.00415.11
5.6.400.0050.00515.58
5.6.390.0070.00015.57
5.6.380.0050.00315.71
5.6.370.0010.00915.58
5.6.360.0040.00615.40
5.6.350.0020.00615.54
5.6.340.0080.00215.67
5.6.330.0070.00215.57
5.6.320.0020.00715.68
5.6.310.0060.00315.54
5.6.300.0040.00814.93
5.6.290.0040.00615.26
5.6.280.0100.00315.23
5.6.270.0020.00815.24
5.6.260.0080.00315.21
5.6.250.0060.00515.25
5.6.240.0080.00415.25
5.6.230.0070.00515.27
5.6.220.0050.00515.28
5.6.210.0040.00615.25
5.6.200.0060.00715.32
5.6.190.0050.00615.36
5.6.180.0060.00715.26
5.6.170.0070.00615.28
5.6.160.0060.00515.35
5.6.150.0040.00615.34
5.6.140.0050.00615.19
5.6.130.0080.00415.29
5.6.120.0070.00515.43
5.6.110.0090.00515.23
5.6.100.0070.00515.20
5.6.90.0070.00515.29
5.6.80.0030.00915.18
5.6.70.0090.00415.22
5.6.60.0040.00715.25
5.6.50.0040.00715.16
5.6.40.0060.00415.13
5.6.30.0040.00715.30
5.6.20.0050.00715.23
5.6.10.0080.00415.19
5.6.00.0100.00715.34

preferences:
30.54 ms | 403 KiB | 5 Q