在php中合并基于索引的2个数组而不覆盖

I have two associative array which I want to merge based on the index / key of an array, i don't want it to overwrite any of the array values from the index.

Array 1:
Array
(
    [66529] => Array
        (
            [Download] => ON
        )
    [66587] => Array
        (
           [Download] => ON
        )
)

Array 2:
Array
(
    [66587] => Array
        (
            [PPT] => ON
        )
    [66529] => Array
        (
            [PPT] => OFF
        )
)

Merged Array should be:

Array
(
    [66529] => Array
        (
            [Download] => ON
            [PPT] => OFF
        )
    [66587] => Array
        (
           [Download] => ON
            [PPT] => ON
        )
)

I know this can be done using the loops, but I am looking for in-built php functions to do this.

Finally, got the expected result. Below is the solution that works for me

$result = array_replace_recursive($array1, $array2);