(PHP 8 >= 8.4.0)
Dom\HTMLDocument::createEmpty — Creates an empty HTML document
Creates an empty HTML document without any elements.
encoding
An empty HTML document.
Example #1 Dom\HTMLDocument::createEmpty() example
Creates an empty document and serializes it.
<?php
$dom = Dom\HTMLDocument::createEmpty();
var_dump($dom->saveHtml());
?>
The above example will output:
string(0) ""
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant