PHP 4.0 Bug #3593 Updated: % (mod or modulo) not behaving correctly
| From: | Bug Database | Date: | Fri, 26 May 2000 10:00:33 +0000 |
| Subject: | PHP 4.0 Bug #3593 Updated: % (mod or modulo) not behaving correctly | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19484@lists.php.net to get a copy of this message | ||
ID: 3593
Updated by: hholzgra
Reported By: shannon.behrens@clearink.com
Status: Closed
Bug Type: Scripting Engine problem
Assigned To:
Comments:
from the manual:
Table 7-1. Arithmetic Operators
...
$a % $b | Modulus | Remainder of $a divided by $b.
...
$b * (int)($a/$b) + ($a%$b) == $a should be true in any case
and thats the way it is in c and php
if perl and python do different let them be
Full Bug description available at: http://bugs.php.net/version4/?id=3593