#ZegnatHTML spec builds on DOM spec, but yes. So the PHP parser is wrong per-spec, but the PHP parser does what at least 2 users (the one who opened the issue, and aaronpk) want. (And probably what more people want, since other people like glenn and gRegorLove went and implemented it.)