The first thing that comes to mind is that you are talking about set operations, for which iterators may not be the best solution.
I do not know if there is an existing solution for your problem, but as a general solution, I would use hash tables. For example, build a hash table using the tokens of the first set (I will call it set from now on, because I think Iterator is not the best word), and you can do it in Theta (N), and then try to insert another set to the same hash table. The first time you encounter collisions, you will know that there is overlap. Of course, this works well if the hash space is wide and the hash function guarantees a small number of collisions, however, you can always encode some kind of workaround.
Given that PHP has associative arrays (which are a form of hash tables), you can also create an array that has tokens as keys, which can again be done in Theta (N), and then use array_key_exists. It is possible that array_key_exists is nothing more than a linear scan of the key list, since I am not familiar with the internal components of PHP, but I am pretty sure that if associative arrays are implemented as hash tables, they should be implemented much more efficiently than linear scanning.
source share