--- title: Document::save --- Document::save — Serializes the DOM tree into a file ## Description ## ```php public Document::save ( string $filename , null $options = null ) : int|false ``` Creates an HTML document from the DOM representation. ## Parameters ##
filename
options
null
. Was used for option constants in \DOMDocument
.false
on failure.
## Examples ##
**Example \#1 Saving a DOM tree into a file**
```php
loadHTML('