On Fri, Jan 23, 2026, 15:17 Alexandre Daubois <[email protected]>
wrote:

> Hi Lynn, thank you for sharing your thoughts.
>
> Le ven. 23 janv. 2026 à 12:44, Lynn <[email protected]> a écrit :
> > What's the expected behavior of `(int) '001'` and `(int) 1.`? I would
> expect both to still be valid integers, but I can't tell from this RFC if
> those scenarios would be affected. The first scenario is common with
> "ZEROFILL" database columns, and the latter is a scenario I recently found
> being used to get a valid int from user input if considered number-ish and
> switch between whole number vs decimal behavior.
>
> They will be indeed valid integers. There is no lossy cast here: "001"
> and "1." are valid integers and expected.
>

According to whose definition of "lossy" is that not a lossy conversion?
The only non lossy conversion is when (string) (int) $value === $value

Everything else *is* lossy. The number of zeroes in front is information,
so is the whitespace around the number.

Your interpretation of lossy seems completely arbitrary to me.

My opinion is that the BC break of this proposal in its current form would
be insane and unreasonable.

Reply via email to