### Description The following code: ```php <?php $dom = new DOMDocument; $dom->loadXML("<container xmlns=\"urn:foo\"/>"); $container = $dom->documentElement; $ns = $container->getAttributeNode("xmlns"); var_dump($ns); $container->removeAttributeNs("urn:foo", ""); var_dump($ns); ``` Resulted in this output: ``` first dump: DOMNameSpaceNode with parent node non-NULL (okay) second dump: DOMNameSpaceNode with parent node non-NULL (not okay) ``` But I expected this output instead: ``` first dump: DOMNameSpaceNode with parent node non-NULL second dump: DOMNameSpaceNode with parent node NULL ``` In versions prior to 8.1 the parent node was always NULL. Mainly creating the issue so I don't forget about this. ### PHP Version 8.1+ ### Operating System _No response_