Have you tried Hack PHP from Facebook? It's basically what you're recommending here plus a lot more (strong typing and generics, for example).
I actually haven't. I've heard about it but never actually gave it a spin. Is it "backwards" compatible with PHP in a way that I could just start running my existing PHP app as a Hack app and slowly start using its better features?
That being said, I've never had to setup Hack on a server. The major difference is that Hack is a compiled language, so it requires significantly different server software to build & run (HHVM last time I checked). Depending on how your current PHP app is setup, this may turn out to be a simple or complex task.
Great, I'll have to put Hack on my list-to-learn and take a look at it in some point.
ES6 needs transpiling as well so needing to have a few extra steps with Hack is not really an issue.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.