I have 2 very large arrays (of size ~2,500,000). I need to find difference between these arrays. By difference I mean I need a resultant array with values that are in array 1 but not in array 2. I have used array_diff() but it takes more than half an hour!
The first array is coming from one DB and second array from another db. They aren't on the same Database server. The arrays aren't of same size. I am dealing with huge number of mobile numbers. I need to find out those mobile numbers which are in one list, but aren't in another list
arrays are normal arrays with numeric keys. Diff code is as follows:
$numbers_list = array_diff($numbers_list, $some_other_list);
Is there a better way of doing this? Please help.