That's right they'd probably be struggling to scale Ruby on Rails like Twitter who started 2 years after facebook.
To be fair, FB struggled to scale with PHP, although it certainly fares better out of the box (even then). A lot of their work has gone into making PHP more performant and better by way of Hack.
PHP7 took a lot of great ideas from Hack but is still saddled with its legacy.
They did? I remember numerous Twitter outages due to scale and the infamous Fail Whale. Twitter's issues risked the company losing users or even it's sustainability as a business.
Never remember Facebook having much issue.
Facebook wouldn't likely exist if it wasn't for PHP. Zuck wrote something quickly in what he knew. They were able to deploy quickly, scale quickly, etc. Internally, they likely had the hope to migrate off of it at some point, but the business goals trumped the tech stack. From an outsiders point of view, no one cares about the tech problems they face with their tech stack.
Facebook is using his own PHP, optimized as fuck, so...
Tell us what they should have used ? :D
A few years later there would have been Rails or Django. With the strides FB made in PHP it would have been cool to see what they could have done with those frameworks/languages.