It's funny but people always reference Facebook whenever PHP is called to discussion. Former CTO and now cofounder of Quora, Adam D'Angelo, has said so himself the main reason for Facebook staying on PHP was mostly for legacy reasons. There was simply no good reason to continue using PHP but it had already become a core part of Facebook so they optimize as best as they can. In building Quora, he decided in hindsight to use Python and had Facebook not been so entrench in it, they probably would have switched. That isn't to say Facebook doesn't already use other languages as part of their infrastructure. And it was in part why hiphop was developed.
That said, I have nothing personal against PHP and have been a PHP developer for years. It does get the job done and is forgiving as you have said but make no mistake, there are better alternatives. There are things that, for example, Python and Ruby is able to do that PHP can't since PHP is purely a web base language and Python and Ruby are not. At the end of the day, it's really what the developer is most comfortable with.