I realize this might not be possible, but I think having different scopes for HTML in PHP files and HTML in normal HTML files so they could be highlighted differently would be nice. Currently the scope for both is “text.html.basic”.
Some possible approaches might be detecting whether there are any PHP blocks, looking at the file extension for saved files, and/or remembering if the user manually picked PHP or HTML in the syntax highlighting menu.
So as not to break the existing syntax highlighting themes the scope for HTML in PHP files could be something like “text.html.basic.php” or “text.html.basic.embedded” (though technically it’s the PHP blocks that are embedded in the HTML). Or maybe have a new top level scope like “file.php”, “file.html”, etc. so the overall scope for HTML in PHP files would be “text.html.basic file.php”.