DOMChildNode::replaceWith
(PHP 8)
DOMChildNode::replaceWith — Replaces the node with new nodes
Description
public DOMChildNode::replaceWith(DOMNode|string ...$nodes): void
Replaces the node with new nodes
. A combination of DOMChildNode::remove() and DOMChildNode::append().
Parameters
-
nodes
-
The replacement nodes.
Return Values
No value is returned.
See Also
- DOMChildNode::after() - Adds nodes after the node
- DOMChildNode::before() - Adds nodes before the node
- DOMChildNode::remove() - Removes the node
- DOMNode::replaceChild() - Replaces a child
© 1997–2021 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/domchildnode.replacewith.php