At least in Python, that's kinda what https://www.makotemplates.org is. Although if you're just using a subset of PHP suitable for templating, it's not really clear to me what benefit there is to PHP syntax versus, say, Jinja2 syntax.
the whole thing with PHP, originally, was you just wrote HTML pages and slipped in PHP <? echo $hello; ?> code here and there where you wanted the server to fill something in with server-side processing as the page was served. This is how it was used before it became common to generate whole templates or pages out of code. You'd be serving a basically static webpage and have a counter at the bottom showing hits, for example, so you'd take your .html and rename it to .php and the counter would be tagged to be generated by the server but everything else would just be plain HTML. PHP still supports this and the fact that it evolved into a full fledged language where you generate HTML from it (as opposed to embedding its output in static pages) still seems slightly humorous to me.