News for hackers. Stuff that matters.
Re:New in PHP 8 by codetrotter on Sunday February 02, 2020 @09:49PM (#22221024)
Over time I think (hope) this sort of change will help to improve the code that people write.

But I will not be surprised to see some people say things like “PHP 8 broke my code”. Of course, what those people might not realize is that PHP 8 did not break their code, the code was always broken, and PHP 8 is now going to surface the brokenness of that code.

But even with code that people refuse to fix, this sort of change will make the brokenness of that code more apparent to others, and so the number of people that use that broken code will cease to grow. If not entirely, then at least reduce in pace of growth.

That is good for the ecosystem of computing. As a proponent of correctness in computing, this makes me happy :)

We all write bugs, but everything our tools and languages of choice can do to help us reduce the number of bugs and the severity (impact on security) of our bugs, the better.

Re:New in PHP 8 by userbinator on Sunday February 02, 2020 @09:52PM (#22221039)
I think it's really a philosophical question what is "broken". An undefined variable used to have a particular and also well-defined behaviour, now it has a different behaviour.

Personally, I think a lot of these design decisions which some people abhor is why PHP became popular in the first place. In that perspective, turning it into yet another "big bureaucratic language" is very much against the spirit of its existence.

Re:New in PHP 8 by koolba on Sunday February 02, 2020 @11:04PM (#22221340)
Since the dawn of programming there’s been a schism as to whether undefined means empty versus being a logical error. But deep down we all know what it should mean.