RE: [PHP] RE: RE: Bitwise operator question

2003-03-05 Thread Dan Sabo
EMAIL PROTECTED] Subject: [PHP] RE: RE: Bitwise operator question Yes... it is the | operator that is doing it. >From the man pages: $a & $b And Bits that are set in both $a and $b are set. $a | $b Or Bits that are set in either $a or $b are set. So, let's say: $a = 5; # 0101 $b

[PHP] RE: RE: Bitwise operator question

2003-03-03 Thread Philip Hallstrom
Yes... it is the | operator that is doing it. >From the man pages: $a & $b And Bits that are set in both $a and $b are set. $a | $b Or Bits that are set in either $a or $b are set. So, let's say: $a = 5; # 0101 $b = 3; # 0011 Then: $a & $b 0101 & 0011 = 0001 (1) and $a | $b 0101 & 00