ID:               49342
 Updated by:       [email protected]
 Reported By:      scott at connerly dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         GNU MP related
 Operating System: Linux
 PHP Version:      5.2.10
 New Comment:

Thank you for your bug report.

The documentation on GMP says:
These functions allow you to work with arbitrary-length integers using
the GNU MP library.

Since 2.5 is not an integer, I don't think your example is supposed to
work. Also, I can't find the example on the function.gmp-cmp page, so it
also does not seem an error in the documentation.


Previous Comments:
------------------------------------------------------------------------

[2009-08-24 04:36:24] scott at connerly dot net

Description:
------------
gnu_cmp doesn't work with decimal strings



Reproduce code:
---------------
---
>From manual page: function.gmp-cmp
---

$integers = gmp_cmp('2','5');
$floats = gmp_cmp('2.5','5');

var_dump($integers,$floats);

Expected result:
----------------
both should return -1

Actual result:
--------------
int(-1)
bool(false)



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49342&edit=1

Reply via email to