src/Iterator/ConcatIterator.php
protected function getIteratorByIndex($index = 0)
    {
        $runningCount = 0;
        foreach ($this->getArrayIterator() as $innerIt) {
            $count = count($innerIt);
            if ($index < $runningCount + $count) {
                return [$innerIt, $index - $runningCount];
            }
            $runningCount += $count;
        }

        return null;
    }
protected function getIteratorByIndex($index = 0)
    {
        $runningCount = 0;
        foreach ($this->getArrayIterator() as $innerIt) {
            $count = count($innerIt);
            if ($index < $runningCount + $count) {
                return [$innerIt, $index - $runningCount];
            }
            $runningCount += $count;
        }

        return null;
    }
protected function getIteratorByIndex ( $ index = 0 ) { $ runningCount = 0 ; foreach ( $ this -> getArrayIterator ( ) as $ innerIt ) { $ count = count ( $ innerIt ) ; if ( $ index < $ runningCount + $ count ) { return [ $ innerIt , $ index - $ runningCount ] ; } $ runningCount += $ count ; } return null ; }
Find which of the inner iterators an index corresponds to

@param int $index
@return [ArrayAccess, int] The iterator and interior index
Find which of the inner iterators an index corresponds to