|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42872 $a -= $b; is not equal to $a = $a - $b;
Submitted: 2007-10-05 23:09 UTC Modified: 2007-10-06 00:05 UTC
From: nasso dot k2 at gmail dot com Assigned:
Status: Not a bug Package: Math related
PHP Version: 5.2.3 OS: Windows XP
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: nasso dot k2 at gmail dot com
New email:
PHP Version: OS:


 [2007-10-05 23:09 UTC] nasso dot k2 at gmail dot com
$large_num -= 1000000 is not equal to $large_num = $large_num - 1000000;

Reproduce code:
$large_num = 1234567890;
while($large_num >= 1000000) $large_num -= 1000000;

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-05 23:47 UTC]
I'm not sure what you're trying to achieve here since your reproduce script is just nonsense. Please provide a self-contained script that begins with '<?php' and ends with '?>' like a PHP scripts usually do.
 [2007-10-06 00:02 UTC] nasso dot k2 at gmail dot com
Problem vanished when updated to 5.2.4, probably my old 5.2.3 was little buggy. Remove this submition, please.
 [2007-10-06 00:05 UTC]
I don't think there was any problem in 5.2.3 either..
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 15 05:01:29 2024 UTC