On Fri, Apr 8, 2022 at 10:35 AM Craig Francis <cr...@craigfrancis.co.uk>
wrote:

> Hi,
>
> I've written a new draft RFC to address the NULL coercion problems:
>
> https://wiki.php.net/rfc/null_coercion_consistency
>
> This is due to the result of the Allow NULL quiz:
>
> https://quiz.craigfrancis.co.uk/
>
> 14 votes for Fatal Type Errors irrespective of `strict_types=1`;
> 13 votes for NULL coercion when not using `strict_types=1`;
> 8 votes to update some parameters to allow NULL;
>
> I appreciate some want to force strict type checking on everyone, but I
> want to make sure we have this properly documented, with names, and
> explanations.
>
> Breaking changes should be justified - if they aren't, they only
> make upgrading difficult and frustrating (bad for security).
>
> Craig
>

This RFC seems to be trying to force all PHP developers, regardless of what
*they* think, to treat null as "whatever the default value is within the
type context of execution", which is probably the most dangerous and
bug-prone usage of null in PHP code. This would make it almost impossible
for most programs to treat null instead as "an undefined value which must
be explicitly set", which is another usage I commonly see in code.

Given that, I think there needs to be much more justification of this
change personally.

Jordan

Reply via email to