Bug #78388 [Opn->Nab]: GMP does not support overloaded unary plus operator
| From: | requinix@php.net | Date: | Fri, 09 Aug 2019 04:41:47 +0000 |
| Subject: | Bug #78388 [Opn->Nab]: GMP does not support overloaded unary plus operator | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222150@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78388&edit=1
ID: 78388
Updated by: requinix@php.net
Reported by: smokey101stair at gmail dot com
Summary: GMP does not support overloaded unary plus operator
-Status: Open
+Status: Not a bug
Type: Bug
Package: GNU MP related
Operating System: All
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
A unary plus does not make the value positive. Just like how a unary minus does not make the value
negative.
Previous Comments:
------------------------------------------------------------------------
[2019-08-09 04:26:20] smokey101stair at gmail dot com
Description:
------------
According to the documentation, the GMP object overloads the arithmetic, bitwise, and comparison
operators in PHP 5.6+. However, it seems that the unary plus operator is not supported. Not sure if
this is a bug or intentional. The negation operator seems to work as expected.
Test script:
---------------
https://3v4l.org/PvRhf
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78388&edit=1