Convert Yii2 to Hack with Hack Transpiler for backwards compatibility?

The Hack team just released an interesting tool: the Hack Transpiler (

It allows you to automatically convert Hack code to reasonably-readable PHP code. In case of Yii2, the framework could be gradually rewritten in Hack (thus allowing for nicer syntax and possibly speed increases for those using the HHVM), while still being compatible with the PHP 5.x runtime for those who use it. The conversion could be part of an automatic job in Travis. Comoposer could contain both a PHP5 branch and a HHVM branch.

I guess we should wait a little bit to see if the tool keeps getting enough attention, but I believe this really offers the best of two worlds. With all the unit tests present in Yii2, it should be possible to do this conversion gradually without harming the users.

And last but not least: it could give Yii a serious boost. There is currently a lack of decent Hack frameworks. By filling this void, a lot of high profile users might come our way and enrich the community in the long term…

Curious about the thoughts of the community about this…

The project is quite interesting to watch but I’m a bit skeptical about benefits it will provide. At least for now.