--TEST-- GH-16151 (Assertion failure in ext/dom/parentnode/tree.c) --EXTENSIONS-- dom --FILE-- appendChild($element); $element->setAttributeNodeNS($attr); try { $attr->insertBefore(new DOMComment("h")); } catch (DOMException $e) { echo $e->getMessage(), "\n"; } try { $attr->appendChild(new DOMComment("h")); } catch (DOMException $e) { echo $e->getMessage(), "\n"; } $attr->insertBefore($doc->createEntityReference('amp')); $attr->appendChild($doc->createEntityReference('amp')); echo $doc->saveXML(); ?> --EXPECT-- Hierarchy Request Error Hierarchy Request Error W