code: public function replaceWith(DOMNode $replacement):void {
  		$this->parentNode->insertBefore($replacement, $this);
  		$this->remove();
  	}
docs: Replace this ChildNode in the children list of its parent with the
  supplied replacement node.
  @param DOMNode $replacement
  @return void