Lets say you have super large unsorted array 20mln elements, and now you want to remove duplicates from it. How would you do this without using second array where you push unique results in PHP. How would you unset element in array without breaking the loop? array_unique is using second array as well.
One way I was thinking is to do with 2 steps, 1st step setting value as null, 2nd step remove all elements which has null value. Is there better way to do so?