(PHP 8 >= 8.4.0)
Dom\HTMLDocument::createEmpty — Creates an empty HTML document
Creates an empty HTML document without any elemens.
encoding
An empty HTML document.
Example #1 Dom\HTMLDocument::createEmpty() example
Creates an empty document and serialices it.
<?php
$dom
=
Dom\HTMLDocument
::
createEmpty
();
var_dump
(
$dom
->
saveHtml
());
?>
The above example will output:
string(0) ""