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
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
2 matches
Mail list logo