note 39977 deleted from language.operators.bitwise by danielc
| From: | danielc@php.net | Date: | Mon, 13 Apr 2009 16:10:41 +0000 |
| Subject: | note 39977 deleted from language.operators.bitwise by danielc | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-153156@lists.php.net to get a copy of this message | ||
Note Submitter: tanstep at hotmail dot com
Reason: 0
----
Beware that strings can be ANDed, XORed, and ORed just fine. When printing the results of a bitwise
operation, results can be a bit confusing, since operands may be converted to strings BEFORE bitwise
operator execution.
so, use this:
print('result: ');
print(pow(2, $pos) & $this->_bits);
print('<br>');
NOT this
print("result: " . pow(2, $pos) & $this->_bits . "<br>");