Compare two associative arrays by key
You can reduce your code in several ways.

First, since you seem to want the absolute value of the difference between qtys for the same ìd`:

$toAdd[$key] = max( $oldReset[$key], $val ) - min( $oldReset[$key], $val );


It can be achieved more simply:

$toAdd[$key] = abs($oldReset[$key] - $val);


BTW, when id doesn't exist in $oldReset you probably want the same, so you should use $toAdd[$key] = abs($val); instead of $toAdd[$key] = intval($val); (but maybe you are sure that qty is always positive).

On the other hand, you're preparing both $newArr and $oldArr to get a simplified version of the form array(id =&gt; qty): you can do it for only one array, so using less code and probably working faster.  

With all the changes proposed above, your whole code becomes:

$oldReset = [];
foreach ($oldArr as $item) {
  $oldReset[$item['id']] = $item['qty'];
}
foreach ($newArr as $key =&gt; $val) {
  $id = $val['id'];
  $qty = $val['qty'];
  if (isset($oldReset[$id])) {
    $toAdd[$id] = abs($oldReset[$id] - $qty);
  }
  else {
    $toAdd[$id] = abs($qty);
  }
}


Last point, I notice that you don't try to detect ids existing in $oldArray and not present in $newArray. But again maybe you're sure it cannot happen.