Bug #11725: Bitwise operators seems buggy
| From: | Pascal dot Dufour at cdt dot eu dot int | Date: | Wed, 27 Jun 2001 08:16:00 +0000 |
| Subject: | Bug #11725: Bitwise operators seems buggy | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-58169@lists.php.net to get a copy of this message | ||
From: Pascal.Dufour@cdt.eu.int
Operating system: Linux 2.2
PHP version: 4.0.6
PHP Bug Type: *General Issues
Bug description: Bitwise operators seems buggy
I have a problem with bitwise operator:
The following script:
<?
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)
It seems that the bitwise 'and' does not work at all, it always returns 0.
I do no understant the result of the bitwise 'or', and why it is displayed prefixed by a
minus sign.
I have read the documentation and I think these are bugs...
I hope I have not misunderstood the doc.
Pascal.
--
Edit Bug report at: http://bugs.php.net/?id=11725&edit=1