summaryrefslogtreecommitdiff
path: root/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt
blob: c39d4e570964f24be6086ce605e0bbecce2a4c89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--TEST--
DOMDocument::saveHTML() vs DOMDocumet::saveXML()
--SKIPIF--
<?php
require_once dirname(__FILE__) .'/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";
--EXPECTF--
<p>Hi.<br/>there</p>
<p>Hi.<br>there</p>