Re: Stricter implicit boolean coercions
| From: | Mark Randall | Date: | Tue, 26 Apr 2022 10:02:43 +0000 |
| Subject: | Re: Stricter implicit boolean coercions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117609@lists.php.net to get a copy of this message | ||
On 26/04/2022 10:54, Andreas Leathley wrote:
Any non-empty string (except "0") is converted to true and any non-zero integer or float is converted to true.If we could get rid of "0" being false, that alone would be a huge benefit for the language in the long run. I know why it exists, but I don't think it should. In fact it never should have existed in the first place.