I’m still amaze with all the designers in this forum. I never thought that designer would know about coding at all, but I think you’re one of those exception that know about both side of the world (designer & coder)
Btw, it’s a great idea, but there is a few errors in the code that might cause a logic error. The overhead on the code provided above by me is when the code try to do strtolower, substring, strpos, and strlen. If following the logic on the code, the process will only have 1 strtolower, 1 strlen, 2 strpos, and 4 substr at most, if all the the open tag and closing tag does appeared on the snippet. The least, it will have 1 strtolower, 1strlen, 2strpos, and 2 substr.
I believe there has to be a better way, if I know each function processing time at the top of my head. I believe the processing overhead will not noticeable unless if we have more than 20 snippets on one page, but I’m not sure, because I haven’t done any benchmark testing yet.

Anyway, if we can enforce this upon saving the snippet, it will be a lot better. I believe the core coder can grab the code provided above and put it on the snippet save processor for the next release, so every snippets will automatically being stripped down from that php tag.