Dom\HTMLDocument::saveHtmlFile
PHP function
Edit on GitHub ✎
(PHP 8 >= 8.4.0)
Serializes the document as an HTML file
Description
Dom\HTMLDocument::saveHtmlFile(string $filename): int|false
Serializes the document as an HTML file.
Parameters
filenameThe path to the file to save to.
Return Values
The number of bytes written on success, or false on failure.
Errors/Exceptions
- Throws a
ValueErroriffilenameis an empty string or contains any null bytes.
See Also
Dom\HTMLDocument::saveHtmlDom\HTMLDocument::saveXmlFile