#37590 [Opn->Bgs]: Bit operators not responding equally
ID: 37590
Updated by: tony2001@php.net
Reported By: jesse at eonstreet dot com
-Status: Open
+Status: Bogus
Bug Type: *Math Functions
Operating System: Windows Xp / FC 3
PHP Version: 5.1.4
New Comment:
Bitwise operators are architecture dependent.
And -4738698913 is actually not an integer, but a float on 32bit
platform.
Previous Comments:
------------------------------------------------------------------------
[2006-05-25 13:08:07] jesse at eonstreet dot com
Description:
------------
** Sorry if I havfe put this in hte wrong category.
I have encountered a difference in the output of a bit operator
combination between windows and FC3.
The example below is part of the code that produces the Google Checksum
when submitting to get a page rank.
In Mozilla Javascript and windows Javascript and well as PHP 5.1.4 on
whindows XP the bit operation returns correclty but under linux there
is a difference
I don't no why.
Reproduce code:
---------------
<?
$a = -4738698913;
echo $a ^= 43814;
?>
Expected result:
----------------
In Windows the result is -443704711
In Linux FC3 the result is -2147439834
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37590&edit=1
Thread (8 messages)