Hi internals!
I'd like to propose removing support for hexadecimal strings in the
is_numeric_string() function, in order to achieve consistency with ordinary
integer and float casts:
https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings
This change drops a WTF in our conversion semantics and should have low BC
impact.
Thanks,
Nikita
I'd like to propose removing support for hexadecimal strings in the
is_numeric_string() function, in order to achieve consistency with ordinary
integer and float casts:https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings
This change drops a WTF in our conversion semantics and should have low BC
impact.
+1, this was always a weird inconsistency and as you note, there's a
robust solution for explicitly saying that you want hex numbers to be
parsed. Would vote yes again.
-Sara
Hi!
I'd like to propose removing support for hexadecimal strings in the
is_numeric_string() function, in order to achieve consistency with ordinary
integer and float casts:https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings
This change drops a WTF in our conversion semantics and should have low BC
impact.
While I'm usually all for preserving BC in this case I think removing
the inconsistency is better and the use case is weird enough that it
makes little sense to implicitly support it. Given that we have options
with both filter and hexdec and casts do not support it, I think this
RFC would do the right thing.
--
Stas Malyshev
smalyshev@gmail.com
Hi internals!
I'd like to propose removing support for hexadecimal strings in the
is_numeric_string() function, in order to achieve consistency with
ordinary
integer and float casts:https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings
This change drops a WTF in our conversion semantics and should have low BC
I fully agree with you here.
Hi internals!
I'd like to propose removing support for hexadecimal strings in the
is_numeric_string() function, in order to achieve consistency with ordinary
integer and float casts:https://wiki.php.net/rfc/remove_hex_support_in_numeric_strings
This change drops a WTF in our conversion semantics and should have low BC
impact.
HUGE +1 here. We commonly run into this WTF and becomes a cause for all
sorts of logic errors :)