--TEST-- Bug #80268 (loadHTML() truncates at NUL bytes) --SKIPIF-- --FILE-- loadHTML("

foo\0bar

"); $html = $doc->saveHTML(); var_dump(strpos($html, '

foo

') !== false); file_put_contents(__DIR__ . '/80268.html', "

foo\0bar

"); $doc = new DOMDocument; $doc->loadHTMLFile(__DIR__ . '/80268.html'); $html = $doc->saveHTML(); var_dump(strpos($html, '

foo

') !== false); ?> --CLEAN-- --EXPECT-- bool(true) bool(true)