|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78388 GMP does not support overloaded unary plus operator
Submitted: 2019-08-09 04:26 UTC Modified: 2019-08-09 04:41 UTC
From: smokey101stair at gmail dot com Assigned:
Status: Not a bug Package: GNU MP related
PHP Version: Irrelevant OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: smokey101stair at gmail dot com
New email:
PHP Version: OS:


 [2019-08-09 04:26 UTC] smokey101stair at gmail dot com
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:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-09 04:41 UTC]
-Status: Open +Status: Not a bug
 [2019-08-09 04:41 UTC]
A unary plus does not make the value positive. Just like how a unary minus does not make the value negative.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Aug 05 09:01:23 2021 UTC