Do note that we have already a lot of array functions that are currently under the collections category as collections share the same array underlying structure.
So there you will find the most common array formatters as well.
function formatter_arrayDiff($baseArray, $compareArray) {
return array_diff($baseArray, $compareArray);
}
Are the values of the first array, found anywhere in the second array.
My use case today is importing two csv files with tens of thousands of records. I just need to know which items are not found in the second array and this is a quick way to make that happen instead of building a repeat, and comparing.