[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpgroupware-developers] what does this mean??
From: |
Jason Wies |
Subject: |
Re: [Phpgroupware-developers] what does this mean?? |
Date: |
Fri, 11 Oct 2002 23:39:12 -0400 |
User-agent: |
Mutt/1.2.5i |
Good explanation, I hadn't understood that before.
Now that we don't support PHP3 though, I would suggest using (bool) for
clarity. Personally I do away with the == True test as well, if ($rights &
$required) works just as well in PHP3 as PHP4 and is clearer IMO. But I think
that is a personal style issue, not something we need to dictate (and I say
that because it's Seek3r's code in question and if he dictated he might dictate
the wrong way :-).
Jason Wies aka Zone
On Fri, Oct 11, 2002 at 08:41:26PM -0500, Michael Dean wrote:
> !! is a simple trick to force the result to a boolean. The results of
> $rights & $required is not a boolean, but the result of a bitmask
> operation. AFAIR, this is more significant in PHP3 than PHP4. Run this
> script to see what I mean. I refrained from testing with 1 and 1 since
> the full effect wouldn't be revealed.
>
> On Fri, 2002-10-11 at 18:14, Chris Weiss wrote:
> > What is "!!"? I only see reference to ! as NOT, and !! seems to be
> > NOT(NOT) or
> > basically no change.