xref: /PHP-8.0/ext/dom/tests/bug78025.phpt (revision a555cc0b)
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--EXPECTF--
15Warning: DOMDocument::loadHTML(): htmlParseDocTypeDecl : no DOCTYPE name ! in Entity, line: 1 in %s on line %d
16string(0) ""
17