An RFC on the PHP wiki proposes deprecating fuzzy type casts and allowing Stringable in strict mode. It still lists PHP 8.6 as its target version and shows no new discussion links since January.
On the internals mailing list, Robert Chapin voiced strong opposition. He sided with earlier remarks by Rowan Tommins, arguing that casting values like (int) $_GET['count'] to obtain a specific type with a default value is a decades-old codified behavior, not a problematic one. Removing it, he wrote, would be a backward compatibility break on the scale of the equality operator changes shipped in PHP 8.0.
Chapin also backed Alexandre Daubois, who had argued the changes should never have been proposed for PHP 8.6 in the first place. Chapin concluded that PHP is not ready for this change and asked whether the RFC could be updated to a later target version or otherwise marked as needing more work.
Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.