File "save.md"
Full Path: /var/www/html/wordpress/wp-content/plugins/wp-optimize/vendor/simplehtmldom/simplehtmldom/docs/HtmlNode/save.md
File size: 416 bytes
MIME-type: text/plain
Charset: utf-8
```php
save ( [ string $filepath = '' ] ) : string
```
Writes the current node to file.
| Parameter | Description |
|------------|--------------------------------------------------------|
| `filepath` | Writes to file if the provided file path is not empty. |
Returns the document string.
**Examples**
```php
$string = $node->save();
$string = $node->save($file);
```