--TEST-- Bug #80268 (loadHTML() truncates at NUL bytes) --EXTENSIONS-- dom --SKIPIF-- = 20912) die('skip For libxml2 < 2.9.12 only'); ?> --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)