On 20.04.2022 at 19:02, Craig Francis wrote: > In contrast, failing early at runtime, on something that is not actually a > problem, like the examples in my RFC, creates 2 problems (primarily > upgrading; but also adding unnecessary code to explicitly cast those > possible NULL values to the correct type, which isn't needed for the other > scalar types).
Null is *not* a scalar type[1], though. This is the reason why it is not coerced for userland functions using *scalar* type hints with coercive typing. [1] <https://www.php.net/is_scalar> -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php