Since any web-framework should be mostly IO-driven, the actual speed of the code matters very little as it will in most cases always be nothing compared to the actual IO-operation itself :/ In case you need certain code to run very fast, most people will write that in C/C++ and patch it into their solution, that's what we did in the Django-workshop I used to work in.
I thought Facebook mostly used C++ for their PHP VM? Facebook itself is alot of PHP, they also use Cassandra (Java DB) for inbox messages I believe.