& and ==
| From: | Victor Ivanov | Date: | Wed, 01 Nov 2000 10:13:32 +0000 |
| Subject: | & and == | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-23132@lists.php.net to get a copy of this message | ||
Hi all,
I'm not subscribed to the list, and maybe this is old news.
I have a simple flags variable and the check below makes me think
that & has lower priority than ==:
$flags = 0;
$F_ACTIVE = 1;
if ($flags & $F_ACTIVE != 0) { // this is OK, FALSE }
if (($flags & $F_ACTIVE) == 0) { // this is OK too, TRUE }
if ($flags & $F_ACTIVE == 0) { // and this fails (FALSE) }
Is it me or there is a problem and if there is, is there quick solution?
I'm using (the latest?) php-4.0.3pl1 as a module.
And one more question: Is there support for the 64 bit long long int type?
sscanf returned error when I tried to scan %qi...
Back to adding () to ~60 checks.. ;)
--
Players win and Winners play
Have a lucky day