What is the difference between array_udiff_assoc() and array_diff_uassoc()?

They both do the same, but udiff-assoc compares the DATA with the user supplied function, while diff-uassoc compares the INDEX with the user supplied function.

As an answer to @lonsesomeday : as indicated by the ‘u’, diff_assoc will use internal functions for all comparisons, and udiff_uassoc uses provided callbacks for index and data comparison.



Leave a Comment