(PHP 5, PHP 7, PHP 8)
DOMNode::removeChild — Removes child from list of children
This functions removes a child from a list of children.
childThe removed child.
If the child could be removed the function returns the old child.
DOM_NO_MODIFICATION_ALLOWED_ERRRaised if this node is readonly.
DOM_NOT_FOUND
Raised if child is not a child of this node.
The following example will delete the chapter element of our XML document.