Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> This is a) ten years old, b) fairly out of date,

No, most of the problems listed still exist in the language. PHP Core didn't fix these, they just added more features on top of them.

Take this part:

https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/#...

Can you tell me which assertions aren't true as of 2022?



> [] can be used on any variable, not just strings and arrays. It returns null and issues no warning.

It warns, will likely become an error in a later version (these are being slowly increased in error level to give people time to migrate): https://3v4l.org/qQdSP

> The [] indexing operator can also be spelled {}.

Not anymore: https://3v4l.org/jtjCj

> Unlike (literally!) every other language with a similar operator, ?: is left associative. So this:

Not anymore: https://3v4l.org/t8io2

Regarding string/number comparisons:

https://wiki.php.net/rfc/string_to_number_comparison


Most of the things in that article that are still true don't actually come up on a day to day basis for professional coders with a good framework and a decent IDE (basically PhpStorm).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: