Bug #75192 [Opn]: Spaceship operator returns wrong value for GMP numbers
Edit report at https://bugs.php.net/bug.php?id=75192&edit=1
ID: 75192
User updated by: marcospassos dot com at gmail dot com
Reported by: marcospassos dot com at gmail dot com
Summary: Spaceship operator returns wrong value for GMP
numbers
Status: Open
Type: Bug
Package: GNU MP related
Operating System: Mac
PHP Version: 7.1.9
Block user comment: N
Private report: N
New Comment:
In fact, the operator overloading works, but the result is not compatible with the operator
specification.
Previous Comments:
------------------------------------------------------------------------
[2017-09-12 01:34:56] marcospassos dot com at gmail dot com
Description:
------------
Operator overloading does not work for the spaceship operator.
Test script:
---------------
$result = gmp_init('1') <=> gmp_init('-1');
Expected result:
----------------
1
Actual result:
--------------
2
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75192&edit=1
Thread (4 messages)