public function not($selector)
    {
        $result = $this->createChildInstance();

        if ($this->length > 0) {
            if (\is_callable($selector)) {
                foreach ($this->nodes as $index => $node) {
                    if (!$selector($node, $index)) {
                        $result->addDomNode($node);
                    }
                }
            } else {
                $selection = self::create($this->document)->find($selector);

                if ($selection->length > 0) {
                    foreach ($this->nodes as $node) {
                        $matched = false;
                        foreach ($selection as $result_node) {
                            if ($result_node->isSameNode($node)) {
                                $matched = true;
                                break 1;
                            }
                        }
                        if (!$matched) {
                            $result->addDomNode($node);
                        }
                    }
                } else {
                    $result->addNodes($this->nodes);
                }
            }
        }

        return $result;
    }
public function not($selector)
    {
        $result = $this->createChildInstance();

        if ($this->length > 0) {
            if (\is_callable($selector)) {
                foreach ($this->nodes as $index => $node) {
                    if (!$selector($node, $index)) {
                        $result->addDomNode($node);
                    }
                }
            } else {
                $selection = self::create($this->document)->find($selector);

                if ($selection->length > 0) {
                    foreach ($this->nodes as $node) {
                        $matched = false;
                        foreach ($selection as $result_node) {
                            if ($result_node->isSameNode($node)) {
                                $matched = true;
                                break 1;
                            }
                        }
                        if (!$matched) {
                            $result->addDomNode($node);
                        }
                    }
                } else {
                    $result->addNodes($this->nodes);
                }
            }
        }

        return $result;
    }
public function not ( $ selector ) { $ result = $ this -> createChildInstance ( ) ; if ( $ this -> length > 0 ) { if ( \ is_callable ( $ selector ) ) { foreach ( $ this -> nodes as $ index => $ node ) { if ( ! $ selector ( $ node , $ index ) ) { $ result -> addDomNode ( $ node ) ; } } } else { $ selection = self :: create ( $ this -> document ) -> find ( $ selector ) ; if ( $ selection -> length > 0 ) { foreach ( $ this -> nodes as $ node ) { $ matched = false ; foreach ( $ selection as $ result_node ) { if ( $ result_node -> isSameNode ( $ node ) ) { $ matched = true ; break 1 ; } } if ( ! $ matched ) { $ result -> addDomNode ( $ node ) ; } } } else { $ result -> addNodes ( $ this -> nodes ) ; } } } return $ result ; }
Remove elements from the set of matched elements.

@param string|self|callable|\DOMNodeList|\DOMNode $selector

@return self
Remove elements from the set of matched elements .