From: php dot net at benjamin dot schulz dot name
Operating system: linux
PHP version: 5CVS-2004-09-25 (dev)
PHP Bug Type: Unknown/Other Function
Bug description: unexpected result on cast from float to int
Description:
------------
not much time for investigation, just a short report,
versions used:
~$ php -v
PHP 4.3.7 (cli) (built: Jun 3 2004 18:50:33)
~$ php5 -v
PHP 5.0.2 (cli) (built: Sep 24 2004 22:16:06)
Reproduce code:
---------------
var_dump((int)hexdec("80000000"));
Expected result:
----------------
(PHP4)
~$ php -r 'var_dump((int)hexdec("80000000"));'
int(-2147483648)
Actual result:
--------------
~$ php5 -r 'var_dump((int)hexdec("80000000"));'
int(2147483647)
--
Edit bug report at http://bugs.php.net/?id=30233&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30233&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30233&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30233&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30233&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30233&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30233&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30233&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30233&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30233&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30233&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30233&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30233&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30233&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30233&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30233&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30233&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30233&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30233&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30233&r=mysqlcfg