2009-07-02 00:01:20 +00:00
|
|
|
--TEST--
|
2011-01-18 19:45:38 +00:00
|
|
|
DOMDocument::saveHTML() optional parameters
|
2009-07-02 00:01:20 +00:00
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
2011-01-18 19:45:38 +00:00
|
|
|
require_once dirname(__FILE__) .'/skipif.inc';
|
2009-07-02 00:01:20 +00:00
|
|
|
?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
$doc = new DOMDocument('1.0');
|
|
|
|
$root = $doc->createElement('html');
|
|
|
|
$root = $doc->appendChild($root);
|
|
|
|
$head = $doc->createElement('head');
|
|
|
|
$head = $root->appendChild($head);
|
|
|
|
$title = $doc->createElement('title');
|
|
|
|
$title = $head->appendChild($title);
|
|
|
|
$text = $doc->createTextNode('This is the title');
|
|
|
|
$text = $title->appendChild($text);
|
2011-01-18 19:45:38 +00:00
|
|
|
echo $doc->saveHTML(NULL), "\n";
|
|
|
|
echo $doc->saveHTML($title), "\n";
|
2009-07-02 00:01:20 +00:00
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2011-01-18 19:45:38 +00:00
|
|
|
<html><head><title>This is the title</title></head></html>
|
|
|
|
|
|
|
|
<title>This is the title</title>
|