As a matter of fact Facebook would probably have run into the same problems if they had used Ruby or Python. These problems are problems of massive scale most of us will never face. Twitter had problems running on Ruby/Rails and i bet theres a case to be made for Python too.
All this says is that at the scale level of facebook you will encounter the limits of dynamic typing scripting languages, but its not a problem with PHP per se and also not a problem that should hold anyone back from choosing php/ruby/python because its premature optimization.
Both Youtube and Disqus (just to mention bigger names) started delegating heavier tasks to Go, instead of Python. So yes, this case can be made for most high level languages.
As a matter of fact Facebook would probably have run into the same problems if they had used Ruby or Python. These problems are problems of massive scale most of us will never face. Twitter had problems running on Ruby/Rails and i bet theres a case to be made for Python too. All this says is that at the scale level of facebook you will encounter the limits of dynamic typing scripting languages, but its not a problem with PHP per se and also not a problem that should hold anyone back from choosing php/ruby/python because its premature optimization.