|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78330 bcscale() modifications persist across requests
Submitted: 2019-07-24 08:40 UTC Modified: 2020-10-21 16:00 UTC
From: Assigned: cmb (profile)
Status: Closed Package: BC math related
PHP Version: 7.2Git-2019-07-24 (Git) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
41 - 19 = ?
Subscribe to this entry?

 [2019-07-24 08:40 UTC]
When bcscale() is used as setter, the modifications persist across
requests.  This is contrary to changing bcmath.scale via

Test script:

Expected result:
1st request: int(0)
2nd request: int(0)

Actual result:
1st request: int(0)
2nd request: int(42)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-07-24 09:19 UTC]
-PHP Version: 7.4Git-2019-07-24 (Git) +PHP Version: 7.2Git-2019-07-24 (Git)
 [2019-07-24 09:19 UTC]
Test script for PHP < 7.3.0:

var_dump(bcadd('1', '1'));

Expected result:

1st request: string(1) "2"
2nd request: string(1) "2"

Actual result:

1st request: string(1) "2"
2nd request: string(5) "2.000"
 [2020-10-21 16:00 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Nov 30 12:03:35 2021 UTC