1--TEST--
2Dom\HTMLDocument serialization of document type
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = Dom\HTMLDocument::createFromString(<<<HTML
9<!DOCTYPE HTML1234 PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
10<html>
11<head>
12</head>
13<body>
14</body>
15</html>
16HTML, LIBXML_NOERROR);
17
18echo "--- XML encoding ---\n";
19echo $dom->saveXml(), "\n";
20echo "--- HTML encoding ---\n";
21// We don't expect to see the public ID and the system ID because the serialization algorithm doesn't serialize those
22echo $dom->saveHtml(), "\n";
23
24?>
25--EXPECT--
26--- XML encoding ---
27<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
28<!DOCTYPE html1234 PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
29<html xmlns="http://www.w3.org/1999/xhtml"><head>
30</head>
31<body>
32
33</body></html>
34--- HTML encoding ---
35<!DOCTYPE html1234><html><head>
36</head>
37<body>
38
39</body></html>
40