Re: [RFC] Warnings for PHP 8.5
| From: | Gina P. Banyard | Date: | Mon, 28 Jul 2025 14:20:19 +0000 |
| Subject: | Re: [RFC] Warnings for PHP 8.5 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128264@lists.php.net to get a copy of this message | ||
On Saturday, 26 July 2025 at 15:16, Claude Pache <claude.pache@gmail.com> wrote:
> > Le 14 juil. 2025 à 18:23, Gina P. Banyard internals@gpb.moe a écrit :
> > Hello internals,
> >
> > Similar to the mass deprecation RFC, I would like to propose the addition of a few
> > warnings in certain situations:
> > https://wiki.php.net/rfc/warnings-php-8-5
>
> * The result of
(string) NAN seems reasonable to me and don’t
> need warning.
> * I agree that (int) NAN does not make much sense, but if we
> warn on that, we should also warn on (int) INF, which makes even
> less sense (I expected (int) INF to yield
> PHP_INT_MAX, but it yields 0).
I've added a whole new section that addresses this, as out of range casts are completely whack.
See: https://wiki.php.net/rfc/warnings-php-8-5#casting_out_of_range_floats_to_int
Best regards,
Gina P. Banyard