Re: Booleans compared to strings [message #181377 is a reply to message #181371] |
Mon, 13 May 2013 22:57 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 5/13/2013 6:26 PM, The Natural Philosopher wrote:
> On 13/05/13 22:22, M. Strobel wrote:
>> Am 13.05.2013 22:24, schrieb Doug Cassidy:
>>> On Monday, May 13, 2013 6:13:11 AM UTC-7, Jerry Stuckle wrote:
>>>> On 5/13/2013 8:29 AM, Doug Cassidy wrote:
>>>> > I dont see why boolean true is equal to string false in any way.
>>>> A string comparison returns false only if the string is NULL, is an
>>>> empty string ('') or contains a zero ('0'). All other values
>>>> (including
>>>> 'false') are true.
>>> got it, thanks
>>>
>> My favourite link to comparison in PHP is
>> http://www.php.net/manual/en/types.comparisons.php
>> where you have also the "if ($x)" results.
>
> Yuk I do not like "0" being a representation of FALSE at all.
>
Then create your own language. Or live with what the language defines.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|