public function next()
    {
        if (false === next($this->values[$this->maxPriority])) {
            unset($this->subPriorities[$this->maxPriority]);
            reset($this->values[$this->maxPriority]);
            $this->maxPriority = empty($this->subPriorities) ? 0 : max($this->subPriorities);
            $this->subIndex    = -1;
        }
        ++$this->index;
        ++$this->subIndex;
    }
public function next()
    {
        if (false === next($this->values[$this->maxPriority])) {
            unset($this->subPriorities[$this->maxPriority]);
            reset($this->values[$this->maxPriority]);
            $this->maxPriority = empty($this->subPriorities) ? 0 : max($this->subPriorities);
            $this->subIndex    = -1;
        }
        ++$this->index;
        ++$this->subIndex;
    }
public function next ( ) { if ( false === next ( $ this -> values [ $ this -> maxPriority ] ) ) { unset ( $ this -> subPriorities [ $ this -> maxPriority ] ) ; reset ( $ this -> values [ $ this -> maxPriority ] ) ; $ this -> maxPriority = empty ( $ this -> subPriorities ) ? 0 : max ( $ this -> subPriorities ) ; $ this -> subIndex = - 1 ; } ++ $ this -> index ; ++ $ this -> subIndex ; }
Set the iterator pointer to the next element in the queue
without removing the previous element
Set the iterator pointer to the next element in the queue without removing the previous element