I've started something like that a year ago. It's called purplescript( https://github.com/martinrusev/purplescript ) and it's a ruby like language written in Python ( with PLY ) and it compiles directly to PHP, so there is no need to rewrite PHP functions - they just work.