- var_dump: documentation ( source)
- array_udiff_assoc: documentation ( source)
<?php
$a = ['a' => '123', 'b' => '321', 'c' => ['asdf' => 'asdf']];
$b = ['a' => '123', 'b' => '123', 'c' => ['asdf' => 'asdf123']];
$r = array_udiff_assoc($a, $b, function($old, $new) {
if ($old === $new) {
return 0;
}
return (count($old) > $new ? 1 : -1);
});
var_dump($r);