1--TEST--
2Dom\HTMLDocument::createFromString(): Old DTD
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = Dom\HTMLDocument::createFromString(<<<HTML
9<!DOCTYPE HTML 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);
17
18echo "--- HTML serialization ---\n";
19echo $dom->saveHtml(), "\n";
20echo "--- XML serialization ---\n";
21echo $dom->saveXml();
22
23?>
24--EXPECTF--
25Warning: Dom\HTMLDocument::createFromString(): tree error bad-doctype-token-in-initial-mode in Entity, line: 1, column: 3-9 in %s on line %d
26--- HTML serialization ---
27<!DOCTYPE html><html><head>
28</head>
29<body>
30
31</body></html>
32--- XML serialization ---
33<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
34<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
35<html xmlns="http://www.w3.org/1999/xhtml"><head>
36</head>
37<body>
38
39</body></html>
40