public function first($selector=null)
    {
        $result = $this[0];
        if ($selector) {
            $result = $result->filter($selector);
        }
        return $result;
    }
public function first($selector=null)
    {
        $result = $this[0];
        if ($selector) {
            $result = $result->filter($selector);
        }
        return $result;
    }
public function first ( $ selector = null ) { $ result = $ this [ 0 ] ; if ( $ selector ) { $ result = $ result -> filter ( $ selector ) ; } return $ result ; }
Returns DomQuery with first node

@param string|self|callable|\DOMNodeList|\DOMNode|null $selector expression that filters the set of matched elements

@return self
Returns DomQuery with first node