On 09/11/2023 14:58, Craig Francis wrote:
We might as well make the PHP 9 upgrade as hard as possible, just to force a
little bit of `strict_types=1` on everyone.
Just to be clear, strict_types has nothing to do with this; changing it
does not allow you to pass nulls to typed parameters, and
I don't think that would actually be wise. Automatic casting of null to
other types is a handy feature and deprecating it brings no benefit to
anyone.
Instead, if you want, submit a proposal to reverse the direction. Make it
so that null is cast to an appropriate type in params and return values.
On 29 Oct 2023, at 11:02, Craig Francis wrote:
> I'm getting really annoyed at the "Passing null to parameter" problem,
As I'm getting the usual negative response (-3), should I write an RFC to
deprecate NULL coercion in all contexts?
At the moment it's weird that `print($nullable)` isn't depr