Re: A different user perspective on scalar type declarations
| From: | Lester Caine | Date: | Fri, 27 Feb 2015 09:40:34 +0000 |
| Subject: | Re: A different user perspective on scalar type declarations | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83987@lists.php.net to get a copy of this message | ||
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