The motivation for this lib to born, is the fact that sometimes u need to get diff of >= 2 arrays, but don't want to rewrite/search the solution again.
composer require arthurkushman/depthy
use depthy\Diff;
$this->diff = new Diff();
$diff = $this->diff->getKeys([
'a' => 'b',
'b' => [
'abc' => 123,
],
], [
'a' => 'b',
'c' => [
'xyz',
],
]); // ['b', 'abc']
$diff = $this->diff->getPairs([
'a' => 'b',
'b' => [
'abc' => 123,
],
'c' => [
'bar' => 'baz',
],
], [
'a' => 'b',
'c' => [
'xyz',
],
]); // ['b' => ['abc' => 123], 'abc' => 123, 'bar' => 'baz']