In regard to all bad criticisms PHP receives,
I believe the language and ecosystem influence the way developers think. A bad language/ecosystem can dictate bad practices and bad design choices because that’s what the language encourages them to do. I remember every PHP-4/5 training course starting by mixing PHP and HTML.
Majority of developers write crappy code even on a decent environment. But there is so much old and bad PHP code out there as a result of many years of teaching how to right bad PHP code that nothing can stop these bad criticisms forever.
I don't write PHP at this moment but I know PHP7 made major improvements. PHP is still a very good choice for rapid web development and fits for many startups, small, and medium size business, and there are many successful examples to back it up.