/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/dom/tests/DOMDocument_saveHTML_variant1.phpt
22 строки
599 B
Max Semenik
Migrate skip checks to --EXTENSIONS--, p2
01 апр 2021, 14:08
01 апр 2021, 14:08
bd9f4fa
Код
Авторство
О чём код?
--TEST-- DOMDocument::saveHTML() optional parameters --EXTENSIONS-- dom --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); echo $doc->saveHTML(NULL), "\n"; echo $doc->saveHTML($title), "\n"; ?> --EXPECT-- <html><head><title>This is the title</title></head></html> <title>This is the title</title>