News for hackers. Stuff that matters.
Re:PHP 8.0.0 Alpha 1 available for testing by aliswe on Friday June 26, 2020 @12:26PM (#23653778)
I liked developing in php. But, the language itself is horrible. It COULD have been good, though.

Like if(1 == "0.999") which iirc evaluates to true.

Re:PHP 8.0.0 Alpha 1 available for testing by Master_Odin on Friday June 26, 2020 @12:45PM (#23654041)
This is untrue: https://3v4l.org/PLcj1

I mean, if you stick enough 9s, it'll probably become true, but that's true in most languages (ignoring the implicit type coercion, but if you don't want that, then use ===, same as JS).

Re:PHP 8.0.0 Alpha 1 available for testing by ragnese on Friday June 26, 2020 @01:07PM (#23654284)
Which part of that offends you? The string conversion or the floating point math? Because floating point math is evil in almost all languages, because they all follow IEEE and because some numbers can't be represented in binary.
Re:PHP 8.0.0 Alpha 1 available for testing by aliswe on Friday June 26, 2020 @05:15PM (#23657135)
Not the string conversion or the rounding, it's both of them combined that makes me unsecure my revolver. That's a joke... Seriously, I look back at my PHP years with mostly great joy. Even though the language is terrible I hardly ever noticed it when practising it.