[php-src] Issue #11791: Wrong default value of DOMDocument.xmlStandalone
| From: | uuf6429 | Date: | Tue, 25 Jul 2023 18:59:20 +0000 |
| Subject: | [php-src] Issue #11791: Wrong default value of DOMDocument.xmlStandalone | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-245037@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11791
Author: uuf6429
The [documentation
here](https://www.php.net/manual/en/class.domdocument.php#domdocument.props.xmlstandalone) says that
xmlStandalone defaults to false when missing, but the following test fails on **PHP 8.1***:
```php
public function testThatStandaloneDefaultsToFalse(): void
{
$doc = new \DOMDocument();
$doc->loadXML('<?xml version="1.0"
encoding="US-ASCII"?><root/>');
$this->assertFalse($doc->xmlStandalone);
}
```
\* I haven't tried it on other PHP versions and 3v4l.org sadly misses
DOMDocument..