There's no simple way to do this for a nested array; you'll have to write your own recursive function. It looks like array_udiff isn't really suitable, either (due to requiring greater-than/less-than information from the comparison function);
This should do the trick:
function recursive_sort_array($a) {
if(!is_array($a))
return $a;
$a = array_map('recursive_sort_array', $a);
sort($a);
return array_values($a);
}
function arrays_different($a, $b) {
return recursive_sort_array($a) === recursive_sort_array($b);
}
What it does: The first function (recursive_sort_array) recursively sorts an array and returns only the values, tied to numeric indexes. Any arrays that have the same values (recursively) will be equal after this operation, and can then be compared with one of the equality operators.