3 ms·
You are using comparison like this after a float cast?? That's a paddlin'.
by chx 2y ago
You are using comparison like this after a float cast?? That's a paddlin'.
- veonik 2y agoYep, that whole example after the float cast is bit silly. After the cast, the value can never be an empty string, or null. Not to mention, comparing a floating point value to an arbitrary, literal value (of zero in this case) is potentially problematic [1]. [1]: See the warning on this page, this applies to all languages with floating point arithmetic. https://www.php.net/manual/en/language.types.float.php https://www.php.net/manual/en/language.types.float.php