|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-06-17 14:08 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 04:00:01 2025 UTC |
If I use the bitwise "&" operator with an integer (bit 32 is set), the result is wrong. <? /* ** result is wrong (1)*/ $a = 4294901760; /* 11111111111111110000000000000000 */ $b = 1; /* 00000000000000000000000000000001 */ $c = $a & $b; printf("$c = $a & $b<BR>"); /* ** result is ok (0) */ $a = 2147450880; /* 1111111111111111000000000000000 */ $b = 1; /* 0000000000000000000000000000001 */ $c = $a & $b; printf("$c = $a & $b<BR>"); ?>