Re: [PHP-DEV] Re: #22527 [Opn->Bgs]: Modulus returned negative value

[email protected] (Sascha Schumann)
Newsgroups php.dev
Message-ID <[email protected]>
> Well, Perl can lean the other way as well actually.  Try this:

    Is there some documentation why the default is as it is?

> You will see it gives you -6.  Like I said, it comes down to which way you
> truncate.  Programmers tend to think that something like (int)(-3.4)
> should result in -3.  If that is what you expect, then I think you also
> have to expect -27%7 to return -6.

    Agreed.

    - Sascha
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.