From: naox at o2 dot pl Operating system: linux and windows PHP version: 5.2.4 PHP Bug Type: Math related Bug description: Diffrent results on windows and linux with same script
Description: ------------ Following script will output DIFFRENT result on windows and linux. Tested with php-5.2.4, php-5.2.0, php-4.4.7 PHP compiled on linux centos 4.5 [EMAIL PROTECTED] [/usr] uname -a Linux sv2.vipserv.org 2.6.21.5-grsec-xxxx-grs-ipv4-32 #7 SMP Thu Sep 13 10:22:01 CEST 2007 i686 i686 i386 GNU/Linux with './configure' '--prefix' '/usr/php-5.2.4.cgi' '--enable-force-cgi-redirect' '--with-xml' '--with-curl=/usr/curl' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-iconv' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-pear' '--with-pgsql=/var/pgsql/bin/pg_config' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--with-zlib' '--with-gettext' '--enable-bcmath' '--with-bz2' '--with-mysqli=/var/mysql5/bin/mysql_config' '--with-mysql=/var/mysql5' '--with-pdo' '--with-pdo-mysql' '--without-sqlite' '--with-xsl' '--enable-mbstring' '--with-pdo-pgsql' '--enable-soap' Reproduce code: --------------- <?php $a = (float) -4738698913; $g = (int) 43814; $a ^= $g; echo $a; ?> Expected result: ---------------- On windows: -443704711 On linux: -2147439834 Windows output is correct result! -- Edit bug report at http://bugs.php.net/?id=42989&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42989&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42989&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=42989&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42989&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42989&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42989&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42989&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42989&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42989&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42989&r=support Expected behavior: http://bugs.php.net/fix.php?id=42989&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42989&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42989&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42989&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42989&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42989&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42989&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42989&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42989&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42989&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42989&r=mysqlcfg