Maybe you could override Volt's rendering method to search the target template for <? and strip out anything between <? and ?> ? That's a brutal way to do it because likely the rest of the template needs the result of the raw PHP code. Maybe you could just die if <? is found and output a nicer "Something's wrong with the template" or "Raw PHP code found" error message instead of the rendered template?