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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC