I also am not claiming that PHP offers no advantages. Certainly it has some good things about it. The choice to allow you to easily interleave PHP code with HTML is an example of a simple feature which makes life really easy when you're setting up a site.
But rewriting in a better language is not necessarily a viable option. It's generally not the call of the person tasked with maintaining it, and even if it is, "cost will amortize quickly" isn't necessarily good enough on a large project with limited funding.
Actively discouraged for years, and removed completely over a year and a half ago.
And that's another part of the problem: the incorporation of really bad ideas that end up poisoning code bases for years to come, simply because they weren't properly vetted before being released.
Also, if PHP is really just sucky and offers no advantages, why not simply rewrite it in a better language? Surely the costs would ammortize quickly.