On 7 May 2022, at 04:45, Jordan LeDoux <[email protected]> wrote:
>
> On Fri, Apr 8, 2022 at 10:35 AM Craig Francis <[email protected]
> <mailto:[email protected]>> wrote:
> https://wiki.php.net/rfc/null_coercion_consistency
> <https://wiki.php.net/rfc/null_coercion_consistency>
>
>
> 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.
Not what I'm going for... but anyway, to get an idea of your position, do you
think the string '15' should be coerced to a number, or should it fatal error
as well? e.g.
$my_number = round($request->get('my_number'));
Craig