src/PowerTools/HTML5/Parser/Tokenizer.php
protected function quotedString($stopchars) {
        $tok = $this->scanner->current();
        if ($tok == '"' || $tok == "'") {
            $this->scanner->next();
            $ret = $this->scanner->charsUntil($tok . $stopchars);
            if ($this->scanner->current() == $tok) {
                $this->scanner->next();
            } else {
                // Parse error because no close quote.
                $this->parseError("Expected %s, got %s", $tok, $this->scanner->current());
            }
            return $ret;
        }
        return false;
    }
protected function quotedString($stopchars) {
        $tok = $this->scanner->current();
        if ($tok == '"' || $tok == "'") {
            $this->scanner->next();
            $ret = $this->scanner->charsUntil($tok . $stopchars);
            if ($this->scanner->current() == $tok) {
                $this->scanner->next();
            } else {
                // Parse error because no close quote.
                $this->parseError("Expected %s, got %s", $tok, $this->scanner->current());
            }
            return $ret;
        }
        return false;
    }
protected function quotedString ( $ stopchars ) { $ tok = $ this -> scanner -> current ( ) ; if ( $ tok == '"' || $ tok == "'" ) { $ this -> scanner -> next ( ) ; $ ret = $ this -> scanner -> charsUntil ( $ tok . $ stopchars ) ; if ( $ this -> scanner -> current ( ) == $ tok ) { $ this -> scanner -> next ( ) ; } else { // Parse error because no close quote. $ this -> parseError ( "Expected %s, got %s" , $ tok , $ this -> scanner -> current ( ) ) ; } return $ ret ; } return false ; }
Utility for reading a quoted string.

@param string $stopchars
Characters (in addition to a close-quote) that should stop the string.
E.g. sometimes '>' is higher precedence than '"' or "'".
@return mixed String if one is found (quotations omitted)
Utility for reading a quoted string .