Recki-CT (Recki Compiler Toolkit) is a project launched by Anthony Ferrara, a long time PHP developer that has joined Google recently as a developer advocate.
Despite he is working at Google, Recki-CT is not really part of his developer advocate work. It is something that he does in the 20% of his work time that Google allows their employees to work on projects of their choice. So, this should not be understood as an official Google project, despite the copyright notices mention Google and contributors need to sign a CLA (Contributor License Agreement).
Recki-CT is a project totally written in PHP itself. It parses PHP code and generates native assembly code as result of the compilation of the PHP code.
How does Recki-CT work?
Anthony was contacted and he was so kind to help clarifying how Recki-CT works and how it can compile PHP code that achieves such impressive performance results.
Basically, Recki is a PHP library that takes some PHP code, parses it to build an Abstract Syntax Tree (AST) using Nikita Popov's PHP-Parser
Then Recki-CT analyses the syntax tree to perform some optimizations. The result is compiled code into an intermediary representation text format. That code is passed to Joe Watkins' JIT-FU extension that emits native code using the libjit library.
The resulting machine code can be executed by calling it like you call a closure function in PHP.
Read more:
http://www.phpclasses.org/blog/post/247-PHP-Developer-working-for-Google-Launches-New-PHP-Compiler.html