Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83946 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33377 invoked from network); 27 Feb 2015 01:29:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 01:29:46 -0000 Authentication-Results: pb1.pair.com header.from=francois@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=francois@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 212.27.42.2 as permitted sender) X-PHP-List-Original-Sender: francois@php.net X-Host-Fingerprint: 212.27.42.2 smtp2-g21.free.fr Received: from [212.27.42.2] ([212.27.42.2:35555] helo=smtp2-g21.free.fr) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/49-32582-A88CFE45 for ; Thu, 26 Feb 2015 20:29:46 -0500 Received: from moorea (unknown [82.240.16.115]) by smtp2-g21.free.fr (Postfix) with ESMTP id C315A4B018B; Fri, 27 Feb 2015 02:29:22 +0100 (CET) Reply-To: To: "'Zeev Suraski'" , "'Mike Willbanks'" Cc: "'PHP Internals'" References: <3d639901ae85227b219e7ee59b3140fe@mail.gmail.com> <2a8b6b586398939a6cc6e5ad0ed67924@mail.gmail.com> <172c4fd82ac7b6fba7b1aec1e01b15fc@mail.gmail.com> In-Reply-To: <172c4fd82ac7b6fba7b1aec1e01b15fc@mail.gmail.com> Date: Fri, 27 Feb 2015 02:29:39 +0100 Message-ID: <0ac801d0522c$dab04c50$9010e4f0$@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGwbbdURx2shUG2o7Zj2Ywptu8MnAHNhHseASj3TG8CBU/YnAHY8IsNAja8iU0CV/sRfgD/+/f7AYCyb0kBGV9t5QDNpl0FnMUjMFA= Content-Language: fr X-Antivirus: avast! (VPS 150226-1, 26/02/2015), Outbound message X-Antivirus-Status: Clean Subject: RE: [PHP-DEV] A different user perspective on scalar type declarations From: francois@php.net (=?utf-8?Q?Fran=C3=A7ois_Laupretre?=) > De : Zeev Suraski [mailto:zeev@zend.com] > > Thanks a lot for the input! We'll reconsider accepting "1"/"0" as = valid > Booleans as the original proposal did. Yes. Same conversion rules : empty string and "0" are false, all the = rest is true. For consistency reasons, we can extend the "0" case to accept leading = zeroes and leading and trailing blanks, as for a numeric string. Probably no need to go as far as common numeric string case, where "0.0" = would be false too, but to be discussed. The rule may be more intuitive = if we say 'any numeric string that converts to a null number is = considered as false'. Just a detail. Regards Fran=C3=A7ois