On 2026-09-24 19:48, Sjoerd Langkemper wrote:
Hi Morgan,
You asked a question about this RFC: https://wiki.php.net/rfc/
throw_error_for_invalid_characters_for_number_base <https://
wiki.php.net/rfc/throw_error_for_invalid_characters_for_number_base>
On Thu, Sep 3, 2026, at 13:41, Morgan wrote:
Just incidentally, does this list of functions include intval()?
I didn't respond to this as I didn't think it was an legimitate
question. However, if I misunderstood you or if you have some additional
thoughts about this please eloborate.
Regards,
Sjoerd
Yes, it's a legitimate question.
Will, for example, intval('hello world', 20) throw? Its current
behaviour is to silently truncate at the first character that's invalid
in the specified base and convert what's left. In the above example it
returns 354, the value of intval('he', 20).
I note that intval() doesn't currently issue a deprecation warning, but
on the other hand the function isn't mentioned at all in the earlier RFC
either.
Morgan