如何将第二个数组放在合并数组的末尾?

Here is my code:

$arr1 = ['p' => 2, 'pm' => 1];
$arr2 = ['p' => ''];
print_r(array_merge($arr1, $arr2));

And here is the current output:

Array
(
    [p] => 
    [pm] => 1
)

And here the expected result:

Array
(
    [pm] => 1
    [p] => 
)

Because the send array ($arr2) in array_merge() contains p key, so I want to put it in the end. Any idea how can I do that?

Probably not the best solution, but I would remove the entries first and then add them again:

print_r(array_merge(array_diff_key($arr1, $arr2), $arr2));

Docs for array_diff_key.