[PHP-DEV] PHP 4.0 Bug #3593: % (mod or modulo) not behaving correctly From: shannon.behrens <email protected>
Date: 02/23/00

From: shannon.behrens <email protected>
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.

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>