note 23014 added to language.operators.bitwise
| From: | php-general at lists dot php dot net | Date: | Sat, 06 Jul 2002 19:08:36 +0000 |
| Subject: | note 23014 added to language.operators.bitwise | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32688@lists.php.net to get a copy of this message | ||
It seems like the bitwise operators have some trouble acting the way they should because of how php
treats signed and unsigned ... If you are trying to do some simple bitwise stuff and you're not
seeing the results that you should... read http://bugs.php.net/bug.php?id=7755
<?
printf("%08x (should be 05CDEA00)<BR>", (0x05CDEA00 & 0xFFFFFFFF));
printf("%08x (should be FFFFFFFF)<BR>", (0x05CDEA00 | 0xFFFFFFFF));
?>
displays:
00000000 (should be 05CDEA00)
-7a321600 (should be FFFFFFFF)
(see also: http://bugs.php.net/bug.php?id=11725 )
It seems like there are no plans to "fix" the issue.
--
http://www.php.net/manual/en/language.operators.bitwise.php
http://master.php.net/manage/user-notes.php?action=edit+23014
http://master.php.net/manage/user-notes.php?action=delete+23014
http://master.php.net/manage/user-notes.php?action=reject+23014