The php in HTML would be solved by the new highlighting engine which supports languages in languages. Snippets could make use of these contexts to select the appropriate snippets.
When you say the new highlighting engine you mean ther'es one getting written right now which supports this? Or do you mean that a new engine would have to be written?
C and C++ is a bit of a different story which can only be solved by letting the user bind/merge languages or something (but I think this only applies to C and C++, so I don't know if it's actually worth doing all the work)
-- Hermann Käser http://www.theragingche.com/