src/Jit/TokenStream.php
public function nextSequence($sequence)
    {
        $start = $this->_current;
        $result = '';
        $len = strlen($sequence);
        $lastToken = substr($sequence, -1);

        while (($content = $this->next($lastToken)) !== null) {
            $result .= $content;
            if (strlen($result) >= $len && substr_compare($result, $sequence, -$len, $len) === 0) {
                return $result;
            }
        }
        $this->_current = $start;
    }
public function nextSequence($sequence)
    {
        $start = $this->_current;
        $result = '';
        $len = strlen($sequence);
        $lastToken = substr($sequence, -1);

        while (($content = $this->next($lastToken)) !== null) {
            $result .= $content;
            if (strlen($result) >= $len && substr_compare($result, $sequence, -$len, $len) === 0) {
                return $result;
            }
        }
        $this->_current = $start;
    }
public function nextSequence ( $ sequence ) { $ start = $ this -> _current ; $ result = '' ; $ len = strlen ( $ sequence ) ; $ lastToken = substr ( $ sequence , - 1 ) ; while ( ( $ content = $ this -> next ( $ lastToken ) ) !== null ) { $ result .= $ content ; if ( strlen ( $ result ) >= $ len && substr_compare ( $ result , $ sequence , - $ len , $ len ) === 0 ) { return $ result ; } } $ this -> _current = $ start ; }
Moves to the next sequence of tokens.

@param  string      $type Tokens sequence to search for.
@return array|null  Returns the skipped text content (the current is not saved).
Moves to the next sequence of tokens .