php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30233 unexpected result on cast from float to int
Submitted: 2004-09-25 23:32 UTC Modified: 2005-01-21 01:00 UTC
Votes:2
Avg. Score:3.5 ± 0.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: php dot net at benjamin dot schulz dot name Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 5CVS-2004-09-25 (dev) OS: linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-09-25 23:32 UTC] 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)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 16:01:31 2024 UTC