3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ "4301" => [ "business_unit_id" => 2, "no_of_invoices" => 1, "invoice_status_query" => 1 ], "4501" => [ "business_unit_id" => 1, "no_of_invoices" => 2, "invoice_status_query" => 0 ] ]; $array2 = [ "4301" => [ "business_unit_id" => 2, "PO_to_be_Approved" => 0 ], "4501" => [ "business_unit_id" => 1, "PO_to_be_Approved" => 0 ] ]; $result = array_replace_recursive($array1, $array2); var_dump($result); foreach ($array1 as $key1 => &$value1) { foreach ($array2 as $key2 => $value2) { if ($key1 === $key2) { $value1 = array_merge_recursive($value1, $value2); } } } var_dump($array1);

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.70.0090.00618.43
8.3.60.0070.01116.49
8.3.50.0060.00916.52
8.3.40.0090.00618.61
8.3.30.0060.01218.57
8.3.20.0070.00021.78
8.3.10.0000.00823.52
8.3.00.0080.00017.93
8.2.190.0100.00716.58
8.2.180.0130.00318.16
8.2.170.0040.01122.96
8.2.160.0070.00720.33
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0080.00020.59
8.2.120.0080.00026.35
8.2.110.0040.00422.20
8.2.100.0070.00417.71
8.2.90.0000.00819.05
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0000.00817.93
8.2.20.0000.00818.07
8.2.10.0060.00317.79
8.2.00.0050.00318.02
8.1.280.0110.00425.92
8.1.270.0040.00422.18
8.1.260.0000.00926.35
8.1.250.0080.00028.09
8.1.240.0030.00620.67
8.1.230.0030.01017.64
8.1.220.0040.00417.76
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0050.00317.36
8.1.180.0040.00418.10
8.1.170.0030.00618.50
8.1.160.0050.00218.88
8.1.150.0050.00318.95
8.1.140.0030.00517.70
8.1.130.0030.00618.91
8.1.120.0030.00317.45
8.1.110.0000.00817.48
8.1.100.0030.00617.41
8.1.90.0020.00517.44
8.1.80.0000.00717.42
8.1.70.0030.00317.43
8.1.60.0060.00317.46
8.1.50.0040.00417.49
8.1.40.0030.00617.51
8.1.30.0030.00617.66
8.1.20.0000.00817.65
8.1.10.0060.00317.41
8.1.00.0030.00617.33
8.0.300.0030.00518.77
8.0.290.0030.00616.75
8.0.280.0000.00718.44
8.0.270.0070.00016.81
8.0.260.0040.00416.81
8.0.250.0040.00416.99
8.0.240.0070.00516.97
8.0.230.0050.00216.91
8.0.220.0000.00716.84
8.0.210.0040.00416.87
8.0.200.0030.00316.96
8.0.190.0000.00716.96
8.0.180.0040.00416.96
8.0.170.0030.00516.92
8.0.160.0070.00016.85
8.0.150.0030.00316.86
8.0.140.0030.00316.82
8.0.130.0000.00713.37
8.0.120.0040.00416.81
8.0.110.0040.00416.88
8.0.100.0040.00416.89
8.0.90.0000.00816.92
8.0.80.0090.00616.91
8.0.70.0040.00416.70
8.0.60.0040.00416.75
8.0.50.0080.00016.83
8.0.30.0060.01217.04
8.0.20.0080.01417.40
8.0.10.0000.00717.05
8.0.00.0090.00916.74
7.4.330.0030.00315.55
7.4.320.0060.00016.52
7.4.300.0040.00416.52
7.4.290.0000.00616.49
7.4.280.0040.00416.46
7.4.270.0030.00616.52
7.4.260.0040.00716.56
7.4.250.0070.00016.57
7.4.240.0030.00316.57
7.4.230.0000.00716.39
7.4.220.0050.00216.57
7.4.210.0050.01016.57
7.4.200.0000.00716.58
7.4.160.0070.01016.59
7.4.140.0100.00817.86
7.4.130.0040.01416.57
7.4.120.0090.01016.48
7.4.110.0060.01216.24
7.4.100.0110.00816.43
7.4.90.0110.00616.51
7.4.80.0130.01019.39
7.4.70.0110.00616.41
7.4.60.0060.00916.55
7.4.50.0120.00316.48
7.4.40.0030.01516.45
7.4.00.0060.01015.01
7.3.330.0020.00213.06
7.3.320.0040.00413.29
7.3.310.0070.00016.17
7.3.300.0070.00016.34
7.3.290.0030.00316.32
7.3.280.0120.00516.35
7.3.260.0100.01116.40
7.3.240.0110.00716.36
7.3.230.0070.01116.22
7.3.210.0040.01616.47
7.3.200.0060.01016.45
7.3.190.0120.00916.44
7.3.180.0090.00916.43
7.3.170.0100.01316.66
7.3.160.0160.00716.41
7.3.120.0050.01315.10
7.3.110.0050.01214.84
7.3.100.0020.01114.81
7.3.90.0060.00614.93
7.3.80.0070.00814.90
7.3.70.0080.00214.66
7.3.60.0100.00414.77
7.3.50.0050.00714.77
7.3.40.0100.00514.71
7.3.30.0070.00714.78
7.3.20.0100.00716.71
7.3.10.0020.01016.69
7.3.00.0100.00316.39
7.2.330.0140.00616.73
7.2.320.0090.01216.71
7.2.310.0060.01216.64
7.2.300.0100.00716.55
7.2.290.0100.01016.77
7.2.250.0070.00715.27
7.2.240.0070.01215.15
7.2.230.0100.00515.00
7.2.220.0060.00615.19
7.2.210.0120.00415.12
7.2.200.0070.00515.01
7.2.190.0080.00814.93
7.2.180.0060.00815.14
7.2.170.0060.00815.11
7.2.160.0040.01115.06
7.2.150.0100.00317.04
7.2.140.0100.00316.96
7.2.130.0080.00816.60
7.2.120.0030.00616.91
7.2.110.0030.00717.00
7.2.100.0030.01717.02
7.2.90.0030.01216.97
7.2.80.0000.01616.81
7.2.70.0090.00916.98
7.2.60.0050.00716.79
7.2.50.0090.00616.89
7.2.40.0030.00616.82
7.2.30.0100.00717.26
7.2.20.0140.00617.44
7.2.10.0150.00917.40
7.2.00.0090.00917.43
7.1.330.0090.00515.79
7.1.320.0030.00515.68
7.1.310.0070.00515.80
7.1.300.0060.00915.83
7.1.290.0060.01115.84
7.1.280.0070.00615.88
7.1.270.0060.00815.80
7.1.260.0070.00515.83
7.1.250.0030.01015.61
7.1.200.0070.00715.85
7.1.150.0130.01216.88
7.1.140.0130.01016.73
7.1.130.0160.01416.98
7.1.120.0150.01017.07
7.1.110.0130.01216.58
7.1.100.0170.00816.04
7.1.90.0130.01016.31
7.1.80.0190.00616.16
7.1.70.0350.00915.51
7.1.60.0370.01833.43
7.1.50.0790.01232.74
7.1.40.0280.01332.60
7.1.30.0320.01232.73
7.1.20.0320.01032.80
7.1.10.0110.01014.83
7.1.00.0110.01114.74

preferences:
18.26 ms | 401 KiB | 5 Q