I know it's cool to hate PHP but I can think of other languages (Perl, VB6, Groovy) I dislike more. For a language to be so hated it has to be used a lot, and that's the primary virtue of PHP: it runs damn-near everywhere. Not only web scripting/apps but you can use it for shell scripting, Lambda/Azure Functions... there are even frameworks for creating native mobile applications with PHP. And I wouldn't be surprised…
Combine with a long-enough life to have some famous bugs (like the hash collision DOS attack), and you have a recipe for widespread derision.
But it kept getting better. I work in PHP at my day job, and I enjoy it. Tools like PhpStorm and Phan make the experience excellent. If PHP 7.4 were launched today as "AWSLang", a stateless object-oriented optionally-typed scripting language that seems designed for working with Lambda functions, we'd love it. "You mean it just dies at the end of the request by default? No shared mutable state between requests? How functional!" Sure, we'd have a few things to complain about. But don't we always?