src/Parser.php
protected function match($regex, &$out, $eatWhitespace = null)
    {
        $r = '/' . $regex . '/' . $this->patternModifiers;

        if (! preg_match($r, $this->buffer, $out, null, $this->count)) {
            return false;
        }

        $this->count += strlen($out[0]);

        if (! isset($eatWhitespace)) {
            $eatWhitespace = $this->eatWhiteDefault;
        }

        if ($eatWhitespace) {
            $this->whitespace();
        }

        return true;
    }
protected function match($regex, &$out, $eatWhitespace = null)
    {
        $r = '/' . $regex . '/' . $this->patternModifiers;

        if (! preg_match($r, $this->buffer, $out, null, $this->count)) {
            return false;
        }

        $this->count += strlen($out[0]);

        if (! isset($eatWhitespace)) {
            $eatWhitespace = $this->eatWhiteDefault;
        }

        if ($eatWhitespace) {
            $this->whitespace();
        }

        return true;
    }
protected function match ( $ regex , & $ out , $ eatWhitespace = null ) { $ r = '/' . $ regex . '/' . $ this -> patternModifiers ; if ( ! preg_match ( $ r , $ this -> buffer , $ out , null , $ this -> count ) ) { return false ; } $ this -> count += strlen ( $ out [ 0 ] ) ; if ( ! isset ( $ eatWhitespace ) ) { $ eatWhitespace = $ this -> eatWhiteDefault ; } if ( $ eatWhitespace ) { $ this -> whitespace ( ) ; } return true ; }
Try to match something on head of buffer

@param string  $regex
@param array   $out
@param boolean $eatWhitespace

@return boolean
Try to match something on head of buffer