array_diff(array1, array2, array3, ...)
For instance:
$array1 = ["A" => 10, "B" => 20, "C" => 30, "D" => 40];
$array2 = ["A" => 10, "B" => 20, "C" => 30];
$result_array = array_diff($array1,$array2);
print_r ($result_array);
// outputs : [D] => 40