php.net |  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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: smokey101stair at gmail dot com
New email:
PHP Version: OS:

 

 [2019-08-09 04:26 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-09 04:41 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2019-08-09 04:41 UTC] requinix@php.net
A unary plus does not make the value positive. Just like how a unary minus does not make the value negative.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Sep 15 12:01:26 2019 UTC