DOMChildNode::replaceWith

(PHP 8)

DOMChildNode::replaceWithReplaces 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