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

Reply via email to