Facebook _doesn't_ run PHP. A large portion of it is coded in PHP, but it runs C++ through HipHop[1]. Facebook may as well be written in anything that compiles down to C++.
For what it's worth, PHP 5.4(without APC) performed better than both Python and Ruby on that language shootout page: http://benchmarksgame.alioth.debian.org/u64/which-programs-a...
http://arstechnica.com/business/2011/12/facebook-looks-to-fi...