Description
The following code:
<?php
$dom = HTMLDocument::createFromString('<p>hello</p>', HTML_NO_DEFAULT_NS);
Resulted in this output:
Warning: Dom\HTMLDocument::createFromString(): tree error unexpected-token-in-initial-mode in Entity
But I expected this output instead:
It to work normally, given that it gets a perfectly valid piece of HTML. It doesn't break the HTML parsing, so it seems to work, but for some reason throws a warning.
PHP Version
PHP 8.4.0 RC1
Operating System
Debian 12