Re: [RFC] Warnings for PHP 8.5
| From: | Alexandru Pătrănescu | Date: | Tue, 29 Jul 2025 11:16:12 +0000 |
| Subject: | Re: [RFC] Warnings for PHP 8.5 | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128292@lists.php.net to get a copy of this message | ||
On Tue, Jul 29, 2025 at 12:18 PM Rob Landers <rob@bottled.codes> wrote:
>
> I am not sure that (int)"INF" or (int)"NAN" is misbehaving.
> (int)"Password" also produces
0, and these are
> strings. If we had the
> time to discuss it properly, I would argue that simply warning when casting
> a string to int is the most sensible thing, just like we get an error when
> coercing a string to int, which is more consistent across the language than
> just special casing some strings.
>
>
>
This is about INF and NAN, the float values, not the strings "INF" and
"NAN".
https://3v4l.org/fAFn3
-- Alex