public function first($selector, \DOMNode $context = null)
    {
        $this->exceptionlevel = 4;

        $nodes = $this->query($selector, $context);

        $this->exceptionlevel = 3;

        $node = $nodes->length ? $nodes->item(0) : null;

        $nodes = null;

        return $node;
    }
public function first($selector, \DOMNode $context = null)
    {
        $this->exceptionlevel = 4;

        $nodes = $this->query($selector, $context);

        $this->exceptionlevel = 3;

        $node = $nodes->length ? $nodes->item(0) : null;

        $nodes = null;

        return $node;
    }
public function first ( $ selector , \ DOMNode $ context = null ) { $ this -> exceptionlevel = 4 ; $ nodes = $ this -> query ( $ selector , $ context ) ; $ this -> exceptionlevel = 3 ; $ node = $ nodes -> length ? $ nodes -> item ( 0 ) : null ; $ nodes = null ; return $ node ; }
Use query-selector like CSS, jQuery, querySelector

@param string $selector
@param \DOMNode $context
@return \DOMNode
Use query - selector like CSS jQuery querySelector