array_diff_assoc() or foreach()? Which can I use? : I have two arrays, for example $session and $post with 100+ values. I will compare the $post array values with $session array. If post is different then it will be taken to result array else not.

We can try this using `array_diff_assoc($post, $session) and foreach()` But which is faster?