PHP associative keys are case-sensitive, key "a" is different from key "A":
<?php
$arr = ["A" => 666];
var_dump($arr["a"]);
var_dump($arr["A"]);
?>
produces:
NULL
int(666)
And in the same way, array_diff_assoc treats keys case-sensitively, and key "A" is not equal to key "a" and will be diffed:
<?php
$compareWhat = ["a" => 666, "b" => 666, "c" => 666, ];
$compareWith = ["A" => 666, "b" => 667, "c" => 666, ];
var_dump(array_diff_assoc($compareWhat, $compareWith));
?>
produces:
array(2) {
["a"]=> int(666)
["b"]=> int(666)
}
And if the order of values in array is different, the order of the result will be different, although essentially the result stays the same:
<?php
$compareWhat = ["b" => 666, "a" => 666, "c" => 666, ];
$compareWith = ["A" => 666, "b" => 667, "c" => 666, ];
var_dump(array_diff_assoc($compareWhat, $compareWith));
?>
produces:
array(2) {
["b"]=> int(666)
["a"]=> int(666)
}