On Mon, 11 Apr 2022 at 13:05, Guilliam Xavier <guilliam.xav...@gmail.com> wrote:
> > https://wiki.php.net/rfc/null_coercion_consistency > > You've updated the **Documentation** section (also: did you mean > "inconsistency" rather than "inconstancy"?) but still not the **Proposal** > (BTW all those sections between "Introduction" and "Proposal" would > probably better be *sub*-sections of a section named "Problem" or "Current > State" or something). > > And for the question: (currently) the RFC is named "NULL Coercion > *Consistency*" and the Proposal says "Must keep the spirit of the original > RFC, and *keep user-defined and internal functions consistent*.", which (to > me) implies *not only* reverting the 8.1 deprecation on internal functions > *but also* "changing user-defined functions under strict_types=0 to > [coerce] null for scalar type[ declaration]s" indeed. > In any case, that should be written clear in the RFC (either in "Proposal" > or "Open Issues"). > Thank you Guilliam, I've applied all of your suggestions (with a slight tweak to use `strict_types=1`, just because I find it easier to read). While I am open to for user-defined functions to keep the type check for NULL when not in `strict_types=1`, it does feel like a bug, and I think it would be better to be consistent (happy to discuss on or off list). Craig