However, these is still a lot of vitrol for PHP. Because it is so easy to use, many people are able to pick it up without any prior SE experience--these people tend to create poorly-designed, slow-running, and, perhaps worst of all, dangerous (vis a vis security) code.
The other major complaint that exists has to do with inconsistency/insanity in PHP's function signatures/naming/evolution. For example: mysql_escape_string and it's sister, mysql_real_escape_string. Although, anyone working with modern PHP probably will never touch these functions.
What is overlooked is that it has an extensive base of developers, it DOES scale (this is proven), and the language is improving (as well as the tooling (PHPUnit, XHProf, CI tools), frameworks, package management etc). And although Facebook does use it, it's important to note that, AFAIK, PHP only exists as a thin layer in between "display HTML" and "communicating with backend servers which are going to handle the majority of the work, save for presentation-layer type stuff."
There are a few alternatives to PHP, but they each have their warts too. Ruby is hilarious slow, for example.