php, array_merge_recursive works well with string keys only
<pre><code>$array1 = [
    '1' =&gt; '11',
    'b' =&gt; 1,
    3   =&gt; 33,
    8   =&gt; 8
];
$array2 = [
    '1' =&gt; '22',
    'b' =&gt; 2,
    3   =&gt; 44,
    9   =&gt; 9
];

$merged = array_merge_recursive($array1, $array2);
</code></pre>

<p>and the result is:</p>

<pre><code>array(7) {
  [0]=&gt;
  string(2) "11"
  ["b"]=&gt;
  array(2) {
    [0]=&gt;
    int(1)
    [1]=&gt;
    int(2)
  }
  [1]=&gt;
  int(33)
  [2]=&gt;
  int(8)
  [3]=&gt;
  string(2) "22"
  [4]=&gt;
  int(44)
  [5]=&gt;
  int(9)
}
</code></pre>

<p>so lets take a glance: the only part is the <code>'b'</code> keys, they are actually works. I dont want to overwrite anything of it but putting them together to an array. Thats good! But then keys the other numeric keys (int or string) are screwed up.
I want to have this as result:</p>

<pre><code>[
  '1' =&gt; ['11', '22']
  'b' =&gt; [1, 2]
  [3] =&gt; [33, 44]
  [8] =&gt; 8,
  [9] =&gt; 9
]
</code></pre>

<p>possible?</p>

<p>EDIT: of course keys "1" and 1 - string vs int key are the same</p>