On Thu, Sep 3, 2026, at 13:41, Morgan wrote:
> Just incidentally, does this list of functions include intval()?

On Thu, Sep 24, 2026, at 14:09, Morgan wrote:
> Will, for example, intval('hello world', 20) throw?

It does not. The reason is technical: intval is implemented differently than 
base_convert and *dec. intval uses libc strtol, whereas the other function do 
the parsing themselves. It should probably be more strict and also throw an 
exception, but that is not part of this RFC.

I thought it was pretty clear that intval was not affected. Both the RFC and 
the top email of this thread give a list of affected functions, which does not 
include intval:

> This will throw an error for octdec, hexdec, bindec and base_convert on 
> invalid input.

The RFC also says explicitly that intval is not affected:

> Other string-to-number or decoding functions (such as `base64_decode()`, 
> `intval()`, etc.) are currently unaffected by this change.

Regards,

Sjoerd Langkemper

Reply via email to