PHP 8.4.3 Released!

Dom\HTMLDocument::saveHtmlFile

(PHP 8 >= 8.4.0)

Dom\HTMLDocument::saveHtmlFileSerializes the document as an HTML file

Description

public Dom\HTMLDocument::saveHtmlFile(string $filename): int|false

Serializes the document as an HTML file.

Parameters

filename
The path to the file to save to.

Return Values

The number of bytes written on success, or false on failure.

Errors/Exceptions

  • Throws a ValueError if filename is an empty string or contains any null bytes.

See Also

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top