Re: [PHP-DEV] [Discussion] Stricter implicit boolean coercions

2022-05-16 Thread Andreas Leathley
On 16.05.22 18:24, Guilliam Xavier wrote: 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)? Yes, that is cor

Re: [PHP-DEV] [Discussion] Stricter implicit boolean coercions

2022-05-16 Thread Guilliam Xavier
On Mon, May 16, 2022 at 5:06 PM Andreas Leathley 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.p

Re: [PHP-DEV] [Discussion] Stricter implicit boolean coercions

2022-05-16 Thread Craig Francis
On 16 May 2022, at 16:19, Kamil Tekiela wrote: > On 16 May 2022, at 16:06, Andreas Leathley wrote: >> https://wiki.php.net/rfc/stricter_implicit_boolean_coercions > > Has any case study been done already about how it will affect existing > codebases? The last time this happened there were no

Re: [PHP-DEV] [Discussion] Stricter implicit boolean coercions

2022-05-16 Thread Andreas Leathley
Hello Kamil, I suspect this is very different depending on the codebase. My main reason for introducing this deprecation notice is to start highlighting possible problems in codebases where nobody even suspected them before. In one application recently I actually had the string "false" (coming fr

Re: [PHP-DEV] [Discussion] Stricter implicit boolean coercions

2022-05-16 Thread Kamil Tekiela
Hi Andreas, Has any case study been done already about how it will affect existing codebases? Regards, Kamil

[PHP-DEV] [Discussion] Stricter implicit boolean coercions

2022-05-16 Thread Andreas Leathley
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 star

[PHP-DEV] Re: Request for wiki karma

2022-05-16 Thread Christoph M. Becker
On 16.05.2022 at 14:19, Andreas Leathley wrote: > I would like to request wiki edit privileges to prepare an RFC for > Stricter implicit boolean coercions, where I started a discussion > recently and am currently finalizing an preliminary implementation. > > Username: iquito RFC karma granted. B

[PHP-DEV] Request for wiki karma

2022-05-16 Thread Andreas Leathley
Hello Internals, I would like to request wiki edit privileges to prepare an RFC for Stricter implicit boolean coercions, where I started a discussion recently and am currently finalizing an preliminary implementation. Username: iquito Thanks! Best regards, Andreas Leathley