Earlier quoted context omitted.
It would be impossible to maintain backward compatibility if they made the language HTML context aware. It would make it more difficult to output any non-HTML content type from a PHP script. It would require many new syntaxes (e.g. for outputting variable data in the attribute values of elements, selectively outputting elements or attributes, looping through them, etc). It would also mean the language is tied to spec…
Backward-compat and syntax doesn't have to be a problem. The ` ` processing instruction can stay as it is, only to be augmented with a new opt-in mechanism based on entity expansion (the fully context-aware templating mechanism built-in to SGML/XML). Eg roughly bla whatever "?> &x where x is bound to markup checked against permissible elements in the first context (eg rejecting ) and escaped into <p>whatever<p>…
Plus, what makes you expect this opt-in syntax would catch on if people already don't care enough to use HTML-aware template engines?
EDIT: Also, what happens if the static parts of the document aren't syntactically correct SGML? How can you even know if the final output will be syntactically correct SGML until you run all the legacy parts of the PHP code that output directly in the document stream?