Edit report at http://bugs.php.net/bug.php?id=51274&edit=1
ID: 51274
Updated by: [email protected]
Reported by: cduncan at regatta dot com
Summary: Integer overflow does not cast as float
-Status: Feedback
+Status: Open
Type: Bug
Package: *General Issues
Operating System: Linux
PHP Version: 5.3.2
New Comment:
Oh, I see what you're getting at now. Sorry about that.
I still can't reproduce it, though.
Previous Comments:
------------------------------------------------------------------------
[2010-03-26 09:16:37] cduncan at regatta dot com
Sorry but I'm misunderstanding what you are telling me. Why is the
number reduced to the 32bit limit? (2147483647)
Especially if you're saying the only way this could occur is with a
64bit OS?
As I stated in my last edit, wouldn't a 64bit OS return:
int(2147483648)
------------------------------------------------------------------------
[2010-03-26 07:50:20] [email protected]
Automatic comment from SVN on behalf of aharvey
Revision: http://svn.php.net/viewvc/?view=revision&revision=296829
Log: Update to the integer type page to make it clearer how overflow
works on 32-
and 64-bit systems and what the critical thresholds are. Prompted by
bug #51274, although not an actual fix for it.
------------------------------------------------------------------------
[2010-03-26 06:33:35] [email protected]
I can't really see any way this could occur other than your server
having a 64-bit install of Linux on it. What distribution is the
server running, what does "uname -m" output, and what does configure
say the host and target system types are?
(Side note: the manual could admittedly be a bit clearer on this;
although the fact integer size differs on different platforms is
mentioned, it might be useful if the Integer Overflow section
actually reiterated it. I'll see about updating it.)
------------------------------------------------------------------------
[2010-03-26 06:21:39] ssufficool at gmail dot com
64 bit ubuntu 10.04 PHP 5.3 SVN:
int(2147483647)
int(2147483648)
32 bit machine and OS PHP 5.2.10:
int(2147483647)
float(2147483648)
------------------------------------------------------------------------
[2010-03-11 19:05:31] cduncan at regatta dot com
64bit machine, 32bit OS.
Also, wouldn't we expect a 64bit to return:
int(2147483647)
int(2147483648)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=51274
--
Edit this bug report at http://bugs.php.net/bug.php?id=51274&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.