A PHP parser written in PHP that generates bytecode for LuaJIT or HHVM's JIT-runtime would be cool. I was thinking about this too. And it would be fun to hack around :)
FB's HHVM JIT and its bytecode format "hhir" is explained is the following recent blog post: http://www.hhvm.com/blog/2027/faster-and-cheaper-the-evoluti...
LuaJIT2 and DynASM: http://luajit.org/
[edit:] I found your repo: https://github.com/cretz/meh ...interesting, I am reading the code atm