xref: /PHP-7.4/ext/dom/tests/bug78025.phpt (revision e246dea9)
1--TEST--
2Bug #78025 (segfault when accessing properties of DOMDocumentType)
3--SKIPIF--
4<?php
5if (!extension_loaded('dom')) die('skip dom extension not available');
6?>
7--FILE--
8<?php
9$htm = "<!DOCTYPE><html></html>";
10$dom = new DOMDocument;
11$dom->loadHTML($htm);
12var_dump($dom->doctype->name);
13?>
14===DONE===
15--EXPECTF--
16Warning: DOMDocument::loadHTML(): htmlParseDocTypeDecl : no DOCTYPE name ! in Entity, line: 1 in %s on line %d
17string(0) ""
18===DONE===
19