On Fri, 8 Apr 2022 at 18:54, Mel Dafert <m...@dafert.at> wrote:

> In particular, does this propose changing user-defined functions under
> strict_types=0 to accept null for scalar types?
>
> Eg., this will be allowed (under strict_types=0):
> ```
> function x(string $y, int $z) {
>   ...
> }
> x(null, null); //no error, no warning
> ```
>


tbh my focus has been on the problems that have come up with internal
functions.

With user defined functions, I think it's up for debate (still a draft),
but I think those NULL's should be coerced to the specified type (as
documented), where I don't think PHP should be doing type checking under
strict_types=0.

Craig

Reply via email to