PHP 4.0 Bug #3593: % (mod or modulo) not behaving correctly

From: Date: Wed, 23 Feb 2000 21:38:43 +0000
Subject: PHP 4.0 Bug #3593: % (mod or modulo) not behaving correctly
Groups: php.dev 
Request: Send a blank email to php-dev+get-15908@lists.php.net to get a copy of this message
From: shannon.behrens@clearink.com Operating system: FreeBSD and Linux PHP version: 4.0 Beta 4 Patch Level 1 PHP Bug Type: Scripting Engine problem Bug description: % (mod or modulo) not behaving correctly I noticed while writing a script that: print (-1%12); produces: -1 when the correct behavior is to produce: 11 Although -1 is "kindof" correct, 11 is the more correct response. It is also the response produced in both Perl and Python.

« previous php.dev (#15908) next »