1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt
2019-03-15 22:55:30 +01:00

27 lines
420 B
PHP

--TEST--
DOMDocument::saveHTML() vs DOMDocumet::saveXML()
--SKIPIF--
<?php
require_once __DIR__ .'/skipif.inc';
?>
--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>