private function parseQuotedString()
    {
        $string = '';
        $delimiter = $this->current;

        // Skip first delimiter
        $this->next();

        while ($this->valid()) {
            if ($delimiter === $this->current) {
                // Skip last delimiter
                $this->next();

                break;
            }

            if ('\\' === $this->current) {
                $string .= $this->parseEscapeSequence();
            } elseif ('"' === $this->current) {
                $string .= '"'.$this->parseQuotedString().'"';
            } elseif ("'" === $this->current) {
                $string .= "'".$this->parseQuotedString()."'";
            } else {
                $string .= $this->current;
                $this->next();
            }
        }

        return $string;
    }
private function parseQuotedString()
    {
        $string = '';
        $delimiter = $this->current;

        // Skip first delimiter
        $this->next();

        while ($this->valid()) {
            if ($delimiter === $this->current) {
                // Skip last delimiter
                $this->next();

                break;
            }

            if ('\\' === $this->current) {
                $string .= $this->parseEscapeSequence();
            } elseif ('"' === $this->current) {
                $string .= '"'.$this->parseQuotedString().'"';
            } elseif ("'" === $this->current) {
                $string .= "'".$this->parseQuotedString()."'";
            } else {
                $string .= $this->current;
                $this->next();
            }
        }

        return $string;
    }
private function parseQuotedString ( ) { $ string = '' ; $ delimiter = $ this -> current ; // Skip first delimiter $ this -> next ( ) ; while ( $ this -> valid ( ) ) { if ( $ delimiter === $ this -> current ) { // Skip last delimiter $ this -> next ( ) ; break ; } if ( '\\' === $ this -> current ) { $ string .= $ this -> parseEscapeSequence ( ) ; } elseif ( '"' === $ this -> current ) { $ string .= '"' . $ this -> parseQuotedString ( ) . '"' ; } elseif ( "'" === $ this -> current ) { $ string .= "'" . $ this -> parseQuotedString ( ) . "'" ; } else { $ string .= $ this -> current ; $ this -> next ( ) ; } } return $ string ; }
Parses a quoted string.

The string is delimited by the current symbol.

@return string The string without delimiting quotes..
Parses a quoted string .