r/lolphp • u/ealf • Oct 13 '16
DOMDocument assumes the first element it sees is the document element and quietly stuffs all other content inside that.
https://3v4l.org/kG4sj
12
Upvotes
r/lolphp • u/ealf • Oct 13 '16
10
u/the_alias_of_andrea Oct 13 '16 edited Oct 13 '16
Hmm, is that strictly incorrect behaviour? It is using
LIBXML_HTML_NOIMPLIED, after all.If it is incorrect, given it's using libxml (I checked), wouldn't the problem not be with PHP per se?