array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'dom-childnode.replacewith.php', 1 => 'Dom\\ChildNode::replaceWith', 2 => 'Replaces the node with new nodes', ), 'up' => array ( 0 => 'class.dom-childnode.php', 1 => 'Dom\\ChildNode', ), 'prev' => array ( 0 => 'dom-childnode.remove.php', 1 => 'Dom\\ChildNode::remove', ), 'next' => array ( 0 => 'class.dom-comment.php', 1 => 'Dom\\Comment', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/dom/dom/childnode/replacewith.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 8 >= 8.4.0)
Dom\ChildNode::replaceWith — Replaces the node with new nodes
Replaces the node with new nodes.
nodesThe replacement nodes. Strings are automatically converted to text nodes.
Не повертає значень.
DOM_HIERARCHY_REQUEST_ERR
Виникає, якщо тип батьківського вузла не дозволяє тип дочірнього вузла,
котрий передано в параметр nodes, або якщо вузол,
який потрібно додати, є одним із предків цього вузла або ним самим.
DOM_WRONG_DOCUMENT_ERR
Виникає, якщо один з переданих nodes було створено не
в тому документі, що і цей вузол.