From: rachmel at avaya dot com
Operating system: WindRiver Linux
PHP version: 5.2.3
PHP Bug Type: *Math Functions
Bug description: floats are stored as ints
Description:
------------
I am cross compiling php from i686-red-hat linux plat to ppc-windriver
linux plat.
The problem I see, is that when trying to assign a value bigger than
MAX_INT (2147483648-1), the variable gets the value of MAX_INT-1.
This is not just an explicit variable issue. Just trying to 'echo' the
same value results in the same problem.
When compiling for my i686 platform, this problem doesn't occur.
I am upgrading from php 5.1.4, and I didn't have any problems in that
version.
Reproduce code:
---------------
<?php
$a = 0x8fffffff;
$b = 2415919103;
var_dump($a);
var_dump($b);
?>
Expected result:
----------------
float(2415919103)
float(2415919103)
Actual result:
--------------
int(2147483647)
int(2147483647)
--
Edit bug report at http://bugs.php.net/?id=41951&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=41951&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=41951&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=41951&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41951&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=41951&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41951&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41951&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41951&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41951&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41951&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=41951&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=41951&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41951&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41951&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41951&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41951&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41951&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41951&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41951&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41951&r=mysqlcfg