Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83987 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24136 invoked from network); 27 Feb 2015 09:40:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 09:40:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.214 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.214 mail4-2.serversure.net Linux 2.6 Received: from [217.147.176.214] ([217.147.176.214:43884] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D3/4A-32582-69B30F45 for ; Fri, 27 Feb 2015 04:40:38 -0500 Received: (qmail 4576 invoked by uid 89); 27 Feb 2015 09:40:35 -0000 Received: by simscan 1.3.1 ppid: 4567, pid: 4573, t: 0.0681s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.8?) (lester@rainbowdigitalmedia.org.uk@86.189.147.37) by mail4.serversure.net with ESMTPA; 27 Feb 2015 09:40:35 -0000 Message-ID: <54F03B92.3030500@lsces.co.uk> Date: Fri, 27 Feb 2015 09:40:34 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: internals@lists.php.net References: <3d639901ae85227b219e7ee59b3140fe@mail.gmail.com> <2a8b6b586398939a6cc6e5ad0ed67924@mail.gmail.com> <172c4fd82ac7b6fba7b1aec1e01b15fc@mail.gmail.com> <0ac801d0522c$dab04c50$9010e4f0$@php.net> In-Reply-To: <0ac801d0522c$dab04c50$9010e4f0$@php.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] A different user perspective on scalar type declarations From: lester@lsces.co.uk (Lester Caine) On 27/02/15 01:29, François Laupretre wrote: > 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. Just been checking and yes if a multi-bit binary field is a string of '0's it's false - nothing to process - but any bit set gives true and one scans for the set bit. This is one where the leading zero may affect the numeric conversion, but you can read it as a array of 1's and 0's ... -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk