Re: [Discussion] Stricter implicit boolean coercions
| From: | Craig Francis | Date: | Mon, 16 May 2022 16:18:50 +0000 |
| Subject: | Re: [Discussion] Stricter implicit boolean coercions | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117735@lists.php.net to get a copy of this message | ||
On 16 May 2022, at 16:19, Kamil Tekiela <tekiela246@gmail.com> wrote:
> On 16 May 2022, at 16:06, Andreas Leathley <a.leathley@gmx.net> wrote:
>> https://wiki.php.net/rfc/stricter_implicit_boolean_coercionsh÷MoG픥«^°¡>
>> J
>
> Has any case study been done already about how it will affect existing codebases?
The last time this happened there were no checks:
https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg
https://externals.io/message/112327
And unfortunately the result was not good for that one :-(
But, at least with this RFC, I can see how some coercions can be problematic, like the string
"false" being cast to true.
With any of these changes, I just wonder what the costs/benefits are, and if there are any edge
cases / oddities.
Craig