Re: [RFC] Deprecate Fuzzy Type Casts and Allow Stringable in Strict Mode

From: Date: Mon, 26 Jan 2026 08:46:19 +0000
Subject: Re: [RFC] Deprecate Fuzzy Type Casts and Allow Stringable in Strict Mode
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-129928@lists.php.net to get a copy of this message
Hello Rowan, Le ven. 23 janv. 2026 à 18:46, Rowan Tommins [IMSoP] <imsop.php@rwec.co.uk> a écrit : > I don't think we should repurpose widely-used syntax for a different use case. If we want > new functionality, with new semantics, we should add new syntax for that. The rules/semantics proposed in this RFC are not new. These are validation rules applied to function arguments (see https://3v4l.org/WQJPv#vnull). This is nothing new, and it doesn't use exotic syntax, but rather a standard type declaration. For this reason, and given the complexity that it would add (even more) to the language, adding new syntax does not seem to me to be the right approach: these behaviors already exist with existing syntax that is well known to everyone. — Alexandre Daubois

« previous php.internals (#129928) next »