Re: [Discussion] Stricter implicit boolean coercions
| From: | Guilliam Xavier | Date: | Mon, 16 May 2022 16:24:33 +0000 |
| Subject: | Re: [Discussion] Stricter implicit boolean coercions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117736@lists.php.net to get a copy of this message | ||
On Mon, May 16, 2022 at 5:06 PM Andreas Leathley <a.leathley@gmx.net> wrote:
>
> Hello Internals,
>
> After the first discussion about this topic
> (https://externals.io/message/117608) I have created a preliminary
> implementation and an RFC for making implicit boolean type coercions
> more strict:
>
> https://wiki.php.net/rfc/stricter_implicit_boolean_coercions
>
> With this email I'm starting the two week discussion period. I welcome
> any feedback on it and hope to further iron out the implementation if
> needed. I mainly chose the route of introducing a deprecation notice
> because it is in line with other RFCs that have similar goals (like the
> Deprecate implicit non-integer-compatible float to int conversions RFC),
> and it is fairly non-intrusive.
>
> Best regards,
>
> Andreas
Hi Andreas,
Thanks! Am I right that it only affects *type declarations*, and the
"Unaffected PHP Functionality" section could also mention implicit
boolean evaluation in
if, ternary conditional (?:) and logical
operators (!, &&, ||, and, or, xor)?
Regards,
--
Guilliam Xavier