You are here: Different binary results with different PHP versions « PHP Programming Language « IT news, forums, messages
Different binary results with different PHP versions

Posted by Skeleton on 05/31/06 09:25

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 10100101010000001110010010100001 at local (PHP 5.1.2)
// Prints 10000000000000000000000000000000 at server (PHP 4.4.2)

Is this a bug? How can I workaround this problem? Thanks.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация