3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array ( 298 => array ( 'dates' => array ( 0 => '2020-12-26 10:39:13', 1 => '2020-12-15 12:18:23', 2 => '2020-12-22 12:27:46', 3 => '2020-12-24 10:51:00', 4 => '2020-12-26 10:01:44', 5 => '2020-12-26 10:31:55', 6 => '2020-12-26 10:48:33', 7 => '2020-12-26 10:56:34' ), ), 184 => array ( 'dates' => array ( 0 => '2020-11-16 07:52:33', 1 => '2020-12-24 13:01:14' ), ), 182 => array ( 'dates' => array ( 0 => '2021-01-05 08:50:27' ), ) ); $array2 = array ( 298 => array ( 'dates' => array ( 0 => '2020-11-16 07:38:26', 1 => '2020-11-16 07:47:05', 2 => '2020-12-15 12:20:07', 3 => '2020-12-24 10:52:35' ), ), 184 => array ( 'dates' => array ( 0 => '2020-11-16 07:53:12' ), ), 53 => array ( 'dates' => array ( 0 => '2020-11-16 07:53:12' ), ) ); $keys = array_unique(array_merge(array_keys($array1), array_keys($array2))); $result = array(); foreach ($keys as $key) { $result[$key]['dates'] = array_merge($array1[$key]['dates'] ?? [], $array2[$key]['dates'] ?? []); } print_r($result);

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.0100.00716.34
8.5.00.0110.01020.24
8.4.150.0020.00114.05
8.4.140.0110.00917.48
8.4.130.0100.01119.28
8.4.120.0110.01024.14
8.4.110.0110.00421.61
8.4.100.0090.00718.95
8.4.90.0120.00720.54
8.4.80.0120.00817.81
8.4.70.0100.00917.80
8.4.60.0110.00717.70
8.4.50.0110.00917.93
8.4.40.0130.00617.89
8.4.30.0080.01222.49
8.4.20.0090.00917.83
8.4.10.0080.00019.37
8.3.280.0090.01318.63
8.3.270.0180.00916.58
8.3.260.0150.00516.58
8.3.250.0130.00319.16
8.3.240.0070.01218.84
8.3.230.0060.00316.27
8.3.220.0040.00618.73
8.3.210.0090.01016.54
8.3.200.0030.00716.60
8.3.190.0100.00716.60
8.3.180.0090.00616.79
8.3.170.0060.00916.43
8.3.160.0050.00318.93
8.3.150.0070.00716.79
8.3.140.0090.00917.33
8.3.130.0090.00320.52
8.3.120.0030.00618.92
8.3.110.0040.00420.94
8.3.100.0130.00324.06
8.3.90.0030.00526.77
8.3.80.0070.00316.50
8.3.70.0100.01316.63
8.3.60.0110.00718.45
8.3.50.0080.00823.65
8.3.40.0110.00418.72
8.3.30.0070.01418.67
8.3.20.0040.00424.18
8.3.10.0060.00324.66
8.3.00.0000.00826.16
8.2.290.0090.00916.57
8.2.280.0080.00516.60
8.2.270.0090.00918.85
8.2.260.0080.00018.35
8.2.250.0040.00418.34
8.2.240.0070.00317.17
8.2.230.0000.00822.58
8.2.220.0060.01037.54
8.2.210.0070.01026.77
8.2.200.0030.00616.38
8.2.190.0120.00616.58
8.2.180.0100.01025.92
8.2.170.0090.00618.70
8.2.160.0070.00722.96
8.2.150.0060.00325.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00019.79
8.2.110.0070.00322.11
8.2.100.0090.00317.97
8.2.90.0040.00419.17
8.2.80.0030.00617.97
8.2.70.0050.00317.63
8.2.60.0040.00418.16
8.2.50.0050.00318.10
8.2.40.0040.00420.55
8.2.30.0040.00418.04
8.2.20.0040.00418.13
8.2.10.0050.00319.37
8.2.00.0040.00419.30
8.1.330.0100.01021.90
8.1.320.0120.00716.32
8.1.310.0150.00418.43
8.1.300.0030.00519.36
8.1.290.0040.00418.88
8.1.280.0160.00625.92
8.1.270.0090.00023.99
8.1.260.0050.00326.35
8.1.250.0030.00628.09
8.1.240.0040.00424.03
8.1.230.0040.00822.14
8.1.220.0080.00017.79
8.1.210.0030.00518.77
8.1.200.0080.00017.35
8.1.190.0030.00617.22
8.1.180.0030.00618.10
8.1.170.0050.00318.64
8.1.160.0040.00419.01
8.1.150.0040.00418.77
8.1.140.0030.00518.85
8.1.130.0000.00720.14
8.1.120.0070.00017.47
8.1.110.0090.00017.35
8.1.100.0040.00417.51
8.1.90.0070.00017.47
8.1.80.0010.00817.43
8.1.70.0030.00317.48
8.1.60.0040.00417.63
8.1.50.0050.00317.41
8.1.40.0000.00817.38
8.1.30.0040.00417.72
8.1.20.0000.00817.57
8.1.10.0080.00417.54
8.1.00.0050.00517.46
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.44
8.0.270.0070.00017.96
8.0.260.0060.00018.57
8.0.250.0000.00816.84
8.0.240.0050.00216.92
8.0.230.0050.00216.83
8.0.220.0030.00316.93
8.0.210.0030.00316.76
8.0.200.0000.00716.89
8.0.190.0060.00316.92
8.0.180.0030.00516.83
8.0.170.0000.00916.97
8.0.160.0000.00716.89
8.0.150.0030.00516.72
8.0.140.0060.00316.90
8.0.130.0030.00313.28
8.0.120.0030.00516.91
8.0.110.0080.00016.79
8.0.100.0040.00416.95
8.0.90.0070.00016.77
8.0.80.0110.00516.84
8.0.70.0060.00316.83
8.0.60.0000.00716.94
8.0.50.0000.00716.88
8.0.30.0130.00317.23
8.0.20.0100.01317.15
8.0.10.0000.00716.89
8.0.00.0110.00816.63
7.4.330.0050.00015.55
7.4.320.0000.00616.42
7.4.300.0060.00016.60
7.4.290.0030.00516.51
7.4.280.0050.00516.60
7.4.270.0030.00316.49
7.4.260.0050.00013.36
7.4.250.0040.00416.52
7.4.240.0030.00316.55
7.4.230.0000.00816.44
7.4.220.0020.00516.61
7.4.210.0030.01116.59
7.4.200.0070.00016.39
7.4.130.0140.01016.19
7.4.120.0140.00316.21
7.4.110.0060.00915.89
7.4.100.0170.00716.33
7.4.90.0130.00316.33
7.4.80.0140.01016.17
7.4.70.0070.01116.04
7.4.60.0110.00616.19
7.4.50.0140.00416.04
7.4.40.0140.00316.13
7.4.30.0150.00316.02
7.4.20.0130.02515.88
7.4.10.0100.00716.39
7.4.00.0040.01416.45
7.3.330.0050.00216.39
7.3.320.0030.00313.07
7.3.310.0030.00316.20
7.3.300.0030.00316.42
7.3.290.0100.00416.34
7.3.260.0130.01016.46
7.3.250.0100.01316.10
7.3.240.0100.00716.38
7.3.230.0090.00616.35
7.3.220.0180.00616.41
7.3.210.0100.01316.11
7.3.200.0150.00915.96
7.3.190.0110.00616.29
7.3.180.0100.00616.19
7.3.170.0060.01216.39
7.3.160.0100.00616.31
7.3.150.0090.00916.32
7.3.140.0030.01316.23
7.3.130.0060.01016.18
7.3.120.0130.00316.14
7.3.110.0120.00816.13
7.3.100.0130.00316.24
7.3.90.0140.00316.45
7.3.80.0100.00716.13
7.3.70.0100.00616.14
7.3.60.0120.00616.28
7.3.50.0130.00716.13
7.3.40.0130.00616.34
7.3.30.0100.00716.36
7.3.20.0130.02116.11
7.3.10.0790.00616.22
7.3.00.0130.00416.46

preferences:
128.43 ms | 403 KiB | 5 Q