DOMNode::cloneNode

Creates a copy of the node

public function cloneNode( bool $deep = false, ): this; 

Parameters

  • bool $deep = false - Indicates whether to copy all descendant nodes. This parameter is defaulted to FALSE.

Returns

  • mixed - - The cloned node.