[php-src] Issue #24300: Breaking Change in Php8.6 Nightly DOMDocument->loadHTML on Win11

From: Date: Tue, 13 Oct 2026 18:02:56 +0000
Subject: [php-src] Issue #24300: Breaking Change in Php8.6 Nightly DOMDocument->loadHTML on Win11
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-252989@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/24300 Author: oleibman ### Description The following code: ```php <?php $dom = new \DOMDocument(); $prefix = '<?xml encoding="UTF-8">'; $html = 'foo'; $dom->loadHTML($prefix . $html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $out = $dom->saveHTML(); echo $out; ``` Resulted in this output (Windows Php8.6 nightly): ``` <!--?xml encoding="UTF-8"--> ``` But I expected this output instead (all other environments): ``` <?xml encoding="UTF-8"><p>foo</p> ``` This is the output from all Php8.2-8.5 for both Windows and Unix, and I believe it is also the output from Php8.6 nightly for Unix. I do not have a Unix Php8.6 testbed, but this seems to be the result at Github using 8.6 nightly. This represents a major break for our product. ### PHP Version ```plain PHP 8.6.0-dev (cli) (built: Oct 12 2026 23:45:52) (ZTS Visual C++ 2026 x64) Copyright © The PHP Group and Contributors Zend Engine v4.6.0-dev, Copyright © Zend by Perforce with Zend OPcache v8.6.0-dev, Copyright ©, by Zend by Perforce ``` ### Operating System Windows 11

« previous php.bugs (#252989) next »