(PHP 8 >= 8.4.0)
Dom\HTMLDocument::saveHtml — Serializes the document as an HTML string
public Dom\HTMLDocument::saveHtml(?Dom\Node $node = null): string
Serializes the document as an HTML string.
nodeThe serialized HTML document string in the current document encoding.
Dom\WRONG_DOCUMENT_ERR if node is from another document.
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/dom-htmldocument.savehtml.php