mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
bd9f4fa676
For rationale, see https://github.com/php/php-src/pull/6787 Make extension checks lowercase, add a special case for opcache that has internal name not matching .so filename. Extensions migrated in part 2: * dom * exif * fileinfo * ffi
23 lines
651 B
PHP
23 lines
651 B
PHP
--TEST--
|
|
Bug #76285 DOMDocument::formatOutput attribute sometimes ignored
|
|
--EXTENSIONS--
|
|
dom
|
|
--SKIPIF--
|
|
<?php if (!defined("LIBXML_HTML_NOIMPLIED")) die("skip libxml2 2.7.7 required"); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$dom = new DOMDocument();
|
|
$dom->formatOutput = false;
|
|
$html = '<div><div><a>test</a></div><div><a>test2</a></div></div>';
|
|
$dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
|
|
$rootNode = $dom->documentElement;
|
|
var_dump($dom->saveHTML($rootNode));
|
|
var_dump($dom->saveHTML());
|
|
|
|
?>
|
|
--EXPECT--
|
|
string(56) "<div><div><a>test</a></div><div><a>test2</a></div></div>"
|
|
string(57) "<div><div><a>test</a></div><div><a>test2</a></div></div>
|
|
"
|