JavaScript sucks pretty hard too, it exhibits some truly terrible design choices, but it’s immensely popular and there are no signs of it’s decline. There’s been a trend in recent years to put emphasis on the importance of writing good JS, and avoiding the bad parts (bad parts as famously highlight by Douglas Crockford), and JS has benefited immensely from this - there’s been an explosion in the depth, variety and of JS frameworks/libraries etc.
Perhaps someone should, as Mr. Crockford did, start highlighting what’s good and what’s bad (in the practical sense, instead of complaining) and start educating people on these things, so that those that care about code quality can get on with writing PHP, and writing it well.