ID: 38908 Updated by: [EMAIL PROTECTED] Reported By: golikov at hotmail dot com -Status: Open +Status: Feedback Bug Type: Variables related Operating System: Linux (2.6.9-34.0.2.ELsmp) PHP Version: 5.1.6 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Not reproducible. Previous Comments: ------------------------------------------------------------------------ [2006-09-21 04:14:46] golikov at hotmail dot com Description: ------------ If big negative number (-3032250090012579) is converted to integer, php 5.1.6 does not overflow on LINUX and uses max negative integer value (-2147483648) instead. Though on Windows it works as ok. Related bug #30315. Reproduce code: --------------- $a2 = 2224955379988029; echo "$a2 => (int)" . (int)$a2 . "\n"; $a3 = -2224955379988029; echo "$a3 => (int)" . (int)$a3 . "\n"; Expected result: ---------------- 2.224955379988E+015 => (int)-888097219 -2.224955379988E+015 => (int)888097219 Actual result: -------------- 2.22495537999E+15 => (int)-888097219 -2.22495537999E+15 => (int)-2147483648 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38908&edit=1