php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78238 BCMath returns "-0"
Submitted: 2019-07-01 23:27 UTC Modified: 2021-07-16 12:51 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: Wes dot nospam at example dot org Assigned: cmb (profile)
Status: Closed Package: BC math related
PHP Version: 7.3.11 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Wes dot nospam at example dot org
New email:
PHP Version: OS:

 

 [2019-07-01 23:27 UTC] Wes dot nospam at example dot org
Description:
------------
Not sure if we care about not returning "-0".
If we do, the reproduce code is:

echo bcadd("0", "-0.1"); // returns "-0"

Used to work back in PHP 4 (!!!) never worked in 5 and 7 https://3v4l.org/hammP

Thanks


Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-02 06:42 UTC] cmb@php.net
Closely relared to bug #78071.
 [2019-07-18 13:30 UTC] test267 at yopmail dot com
The following pull request has been associated:

Patch Name: Implemented HTTP client
On GitHub:  https://github.com/php/web-bugs/pull/79
Patch:      https://github.com/php/web-bugs/pull/79.patch
 [2019-11-07 11:30 UTC] nikic@php.net
-PHP Version: 7.4.0alpha2 +PHP Version: 7.3.11
 [2021-07-16 12:51 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2021-07-16 12:51 UTC] cmb@php.net
The following pull request has been associated:

Patch Name: Fix #78238: BCMath returns "-0"
On GitHub:  https://github.com/php/php-src/pull/7250
Patch:      https://github.com/php/php-src/pull/7250.patch
 [2021-07-16 14:02 UTC] git@php.net
Automatic comment on behalf of cmb69
Revision: https://github.com/php/php-src/commit/bcb89c75ece71869c99032e078e0ec4fe12b2645
Log: Fix #78238: BCMath returns "-0"
 [2021-07-16 14:02 UTC] git@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC