2016-10-23 12:55 GMT+02:00 Marc Bennewitz <dev@mabe.berlin>:

> Hi internals,
>
> On casting a non numeric value to a float in PHP the result will be
> float(0).
>
> In PHP-7.0 an exception was introduced that on casting a string
> "/\s*NaN\s*/i" will result in float(NaN).
>
> https://3v4l.org/2Xakm
>
> Wouldn't it be more logical and expected to return NaN in all cases of
> casting a non numeric string to a floating point number?
>
> Thanks
> Marc
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
+1

Regards, Niklas

Reply via email to