public void remove() {
        lockChain();
        updateCurrentIterator();

        lastUsedIterator.remove();
    }
Removes from the underlying collection the last element
returned by the Iterator.  As with next() and hasNext(),
this method calls remove() on the underlying Iterator.
Therefore, this method may throw an
UnsupportedOperationException if the underlying
Iterator does not support this method.

@throws UnsupportedOperationException if the remove operator is not supported by the underlying Iterator
@throws IllegalStateException         if the next method has not yet been called, or the remove method has
                                      already been called after the last call to the next method.
jphp-runtime/src/php/runtime/common/collections/iterators/IteratorChain.java