This is what I don't understand. Not that many years ago everyone hated JS and PHP equally.
True. Maybe it's due to PHP being on the server-side and staying bad at it whilst JS has become good at client-side. If you ask me, I'd prefer PHP over JS to do some server-side coding.
JS didn't "become good" at client-side. It got faster. PHP also got faster. It got a package management system with some good packages. PHP also got a package management system with some good packages. You can still write pure garbage JS if you feel like it. You can still write pure garbage PHP if you feel like it. Best practices in both allow you to write better code in both if you feel like it.
Well no, JS became good at client-side.
Overall, JS became very fit at being a click handler.
On the other hand, there is no area where PHP shines. All new features are half-assed and just trying to copy the cool kids.
Just take ?? (introduced in 7.0). It's called the "null coalescing operator", yet the doc says it's equivalent to using isset() and not is_null(). That's also a reminder that isset() should get the same underscore as is_null(). Inconsistency is a fucking design pattern in this language and it certainly has not been cured.
That's why people don't hate JS anymore but still hate PHP.
Decent libraries also appeared for php via composer & packagist.
PHP also got more useful tools built into the language like try/catch, generators, yield, finally, Constant array/string dereferencing, simpler password hashing, more internationalization time and date features, ... operator, namespace improvements, variable type declarations, return type declarations, array constants, anonymous classes, improvements around anonymous functions, more OOP features.
As for isset() vs is_null()... I just type "is" into any of my IDE's and they both show up as options. IF I were to type out isnull manually I'll immediately get an error warning. Were you writing PHP in notepad or something? Inconsistency in PHP will NEVER be cured, just like the bad ideas in JS or the DOM will never be cured. New things will be added on top and it will be up to the developer to remember to not use the old things.
I can appreciate your hate of PHP because you have experience. I'm just tired of people talking smack about one but not the other when anyone with enough experience should really be able to fairly explain what they hate about both.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.