I am using Windows XP + PHP 5.1.2 at home for development and using
Linux + PHP 4.4.2 at server side. In my code, I am doing some bitwise
operations. While doing this, I have come accross to different results
from my functions that uses bitwise xor (^) operator. When I digg into
the code, I have tried to print out the binary of a decimal number. The
result was so:
echo decbin(-5817441119);
// Prints 101001010100000 011100100101000 01 at local (PHP 5.1.2)
// Prints 100000000000000 000000000000000 00 at server (PHP 4.4.2)
Is this a bug? How can I workaround this problem? Thanks.
Linux + PHP 4.4.2 at server side. In my code, I am doing some bitwise
operations. While doing this, I have come accross to different results
from my functions that uses bitwise xor (^) operator. When I digg into
the code, I have tried to print out the binary of a decimal number. The
result was so:
echo decbin(-5817441119);
// Prints 101001010100000 011100100101000 01 at local (PHP 5.1.2)
// Prints 100000000000000 000000000000000 00 at server (PHP 4.4.2)
Is this a bug? How can I workaround this problem? Thanks.
Comment