php-src/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt
DanielEScherzer 41996e8d4f
ext/[cd]*: fix a bunch of typos (#16298)
Only functional change is the renaming of the functions
`dom_document_substitue_entities_(read|write)` to replace `substitue` with
`substitute`.
2024-10-09 17:40:42 +02:00

25 lines
386 B
PHP

--TEST--
DOMDocument::saveHTML() vs DOMDocument::saveXML()
--EXTENSIONS--
dom
--FILE--
<?php
$d = new DOMDocument();
$str = <<<EOD
<html>
<head>
</head>
<body>
<p>Hi.<br/>there</p>
</body>
</html>
EOD;
$d->loadHTML($str);
$e = $d->getElementsByTagName("p");
$e = $e->item(0);
echo $d->saveXml($e),"\n";
echo $d->saveHtml($e),"\n";
?>
--EXPECT--
<p>Hi.<br/>there</p>
<p>Hi.<br>there</p>