From:             [EMAIL PROTECTED]
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



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to