What ever happened to Hack (https://hacklang.org) the language Meta built as a superset of PHP?
Why not take an approach more similar to TypeScript?
I sometimes do wonder if many of the server side rendering approaches (or alternative Node runtimes) would be better off trying to emulate some aspects of PHP