News for hackers. Stuff that matters.
Re:What's new in PHP 8? by overgard on Friday August 14, 2020 @01:58PM (#24161062)
I could see this coming up in a pretty straightforward way actually. I used to have a coworker that would always write his conditions backwards, so like

    if(false == something) {}
In this case it's a semi-obscure C programming style to avoid accidentally using = in an if statement. (I think it's silly, but a decent number of people do it). So I could easily see a case in PHP where someone writes...

    if(0 == $foo)
and $foo usually holds a numerical string, but maybe a user entered "" there and now it's cast to 0 and maybe that code path shouldn't be taken.

There are no comments on this comment yet.