Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117609 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 44573 invoked from network); 26 Apr 2022 08:27:31 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 26 Apr 2022 08:27:31 -0000 To: internals@lists.php.net Date: Tue, 26 Apr 2022 11:02:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Content-Language: en-GB References: <3fcdfa2c-7a9c-d634-ea56-8b1e5bf1a911@gmx.net> In-Reply-To: <3fcdfa2c-7a9c-d634-ea56-8b1e5bf1a911@gmx.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 149.241.131.223 Subject: Re: Stricter implicit boolean coercions From: marandall@php.net (Mark Randall) Message-ID: 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.