#30233 [Opn->Fbk]: unexpected result on cast from float to int
| From: | tony2001@php.net | Date: | Thu, 13 Jan 2005 01:22:47 +0000 |
| Subject: | #30233 [Opn->Fbk]: unexpected result on cast from float to int | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-72016@lists.php.net to get a copy of this message | ||
ID: 30233
Updated by: tony2001@php.net
Reported By: php dot net at benjamin dot schulz dot name
-Status: Open
+Status: Feedback
Bug Type: Zend Engine 2 problem
Operating System: linux
PHP Version: 5CVS-2004-09-25 (dev)
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.0-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2004-09-25 23:32:27] php dot net at benjamin dot schulz dot name
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 this bug report at http://bugs.php.net/?id=30233&edit=1