Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-08 Thread hakre
: Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0 So the question is only whether +0 or -0 (or +0, etc.) should be accepted as integers by FILTER_VALIDATE_INT. I think they should, because we also accept non-canonical inputs such as +5, i.e., we always accept a sign. It's true that 0

Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-08 Thread Gustavo Lopes
On Fri, 08 Feb 2013 20:04:35 +0100, hakre hanskren...@yahoo.de wrote: - Ursprüngliche Message - Von: Gustavo Lopes glo...@nebm.ist.utl.pt So the question is only whether +0 or -0 (or +0, etc.) should be accepted as integers by FILTER_VALIDATE_INT. I think they should, because we also

Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-08 Thread hakre
...@divbyzero.net Gesendet: 21:19 Freitag, 8.Februar 2013 Betreff: Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0   A special case still left is ±0. It is with the 'PLUS-MINUS SIGN' (U+00B1). By special case, I meant a deviation to the general rule on how the code handles the input. The code

Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-08 Thread Gustavo Lopes
On Fri, 08 Feb 2013 22:09:22 +0100, hakre hanskren...@yahoo.de wrote: - Ursprüngliche Message - Von: Gustavo Lopes glo...@nebm.ist.utl.pt A special case still left is ±0. It is with the 'PLUS-MINUS SIGN' (U+00B1). By special case, I meant a deviation to the general rule on how the

Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-08 Thread Derick Rethans
On Fri, 8 Feb 2013, hakre wrote: Von: Gustavo Lopes glo...@nebm.ist.utl.pt So the question is only whether +0 or -0 (or +0, etc.) should be accepted as integers by FILTER_VALIDATE_INT. I think they should, because we also accept non-canonical inputs such as +5, i.e., we always

AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-04 Thread Frank Liepert
The change to FILTER_VALIDATE_INT seems to be inconsistent. First of all, take the following bug (https://bugs.php.net/bug.php?id=54096) where it says PHP defines -0 as an int.. Where does PHP define it? The documentation says: An integer is a number of the set ℤ = {..., -2, -1, 0, 1, 2, ...}.

Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-04 Thread Gustavo Lopes
On Mon, 04 Feb 2013 12:14:50 +0100, Frank Liepert frank.liep...@gmx.de wrote: The change to FILTER_VALIDATE_INT seems to be inconsistent. First of all, take the following bug (https://bugs.php.net/bug.php?id=54096) where it says PHP defines -0 as an int.. Where does PHP define it? The

Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-04 Thread Pierre Joye
Hi, On Feb 4, 2013 12:33 PM, Gustavo Lopes glo...@nebm.ist.utl.pt wrote: So the question is only whether +0 or -0 (or +0, etc.) should be accepted as integers by FILTER_VALIDATE_INT. I think they should, because we also accept non-canonical inputs such as +5, i.e., we always accept a sign. It's

AW: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-04 Thread Frank Liepert
So the question is only whether +0 or -0 (or +0, etc.) should be accepted as integers by FILTER_VALIDATE_INT. I think they should, because we also accept non-canonical inputs such as +5, i.e., we always accept a sign. It's true that 0 is neither positive or negative, but I don't think

Re: AW: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0

2013-02-04 Thread Brian Moon
Both statements are wrong, since the purpose of the filter extension is to validate strings. I found this information in BR #52884 (see last comment). Maybe it should be added to the docs? It's nonsense to say, that FILTER_VALIDATE_INT must work like var_dump() since they are both serving