phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] what does this mean??


From: Dan Kuykendall
Subject: Re: [Phpgroupware-developers] what does this mean??
Date: Sat, 12 Oct 2002 11:14:07 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826

Thanks Michael! I was trying to remeber what this was supposed to do, and I knew I needed a bit result, but Ive been dealing with PHP4 too much these days.

Glad to see you show up on the list. You and forward thinking ideas are missed. Fortunatly most of what you tried teaching us has finally sunk in and its working well :-)

Dan

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.



------------------------------------------------------------------------

$c0 $c1 $c2 $c3 $c4
"); } function test_expr($i, $j) { tr( "$i & $j", $i & $j, ($i & $j) == true ? 'Y' : 'N', !!($i & $j), !!($i & $j) == true ? 'Y' : 'N' ); } tr('Expression', 'Result', 'Result == true', '!!Result', '!!Result == true'); test_expr(8, 31); test_expr(8, 32); ?>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]