#49071 [NEW]: gmp_intval returns bad value
From: erha at freemail dot hu
Operating system: windows
PHP version: 5.2.10
PHP Bug Type: GNU MP related
Bug description: gmp_intval returns bad value
Description:
------------
In the following code gmp_intval returns bad results. Replace it with
gmp_strval to see the difference:
Reproduce code:
---------------
$val = "19991231235958";
$value = gmp_init($val);
$res = gmp_div_qr($value, "0x100000000");
$b1 = (string) gmp_intval($res[1]);
$b2 = (string) gmp_intval($res[0]);
echo "$b1 $b2";
--
Edit bug report at http://bugs.php.net/?id=49071&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49071&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49071&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49071&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49071&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49071&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49071&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49071&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49071&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49071&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49071&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49071&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49071&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49071&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49071&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49071&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49071&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49071&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49071&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49071&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49071&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49071&r=mysqlcfg
Thread (2 messages)
- erha at freemail dot hu