I stumbled across something called 'HipHop' from Facebook :
Here is how Sebastian Bergmann describes it :
"HipHop for PHP" is a source code transformer that turns PHP 5.2 code (minus some features) into C++ code that can then be compiled with g++, for instance, to a regular binary.
Since much of the Facebook front-end is written in PHP, they found HipHop necessary to reduce their need for servers.
Here are a couple articles on this :