[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpgroupware-developers] what does this mean??
From: |
Chris Weiss |
Subject: |
Re: [Phpgroupware-developers] what does this mean?? |
Date: |
Fri, 11 Oct 2002 23:14:11 +0000 |
What is "!!"? I only see reference to ! as NOT, and !! seems to be NOT(NOT) or
basically no change.
>From a little test I just did, php evaluates True as 1 and False as null or
>empty.
However, 0 == false evaluates as 1, or True. And, using === you can distingush
between the int and boolean, 1 == true is true but 1 === true is false, but
true ===
true is true.
As for the givin !!($rights & $required) == True it's a bit confusing. It sould
either be !($rights & $required) or ($rights & $required) != True or !($rights &
$required) == False or something a lot clearer as to what's supposed to be
compaired.
Bradley W. Langhorst (address@hidden) wrote*:
>
>
> if (!!($rights & $required) == True)
>
>i understand the $rights & $required
>eg (rights = 00000001
> required = 00000001)
>we get 00000001
>
>but !! appears to be not not - which appears to do nothing
>
>is there some special meaning to !! as opposed to ! !
>(not according to http://www.php.net/manual/en/language.operators.php)
>
>does php's == not know how to handle boolean comparison between an int
>and a bool but its ! operator does know how to cast from an int to a
>bool? If that's what this is - yikes - could it BE any uglier?
>(i hope you catch my Chandler impression...)
>
>thanks!
>
>I think I'm making some headway now...
>
>brad
>
>
>
>
>
>
>
>
>_______________________________________________
>Phpgroupware-developers mailing list
>address@hidden
>http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
>