private void checkLocked() {
        if (isLocked) {
            throw new UnsupportedOperationException("IteratorChain cannot be changed after the first use of a method from the Iterator interface");
        }
    }
Checks whether the iterator chain is now locked and in use.
jphp-runtime/src/php/runtime/common/collections/iterators/IteratorChain.java