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.
More tools in the language (let/const, generators, sets, etc)
Newer version being backported through transpiling
New ways to avoid the callback hell (promises, async/await)
Better ways to integrate with CSS (custom properties)
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.
let
/const
, generators, sets, etc)async
/await
)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 usingisset()
and notis_null()
. That's also a reminder thatisset()
should get the same underscore asis_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.