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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 04:01:31 2024 UTC