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

From: Date: Mon, 04 Feb 2013 11:40:40 +0000
Subject: Re: AW: [PHP-DEV] FILTER_VALIDATE_INT and +0/-0
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-65630@lists.php.net to get a copy of this message
Hi, On Feb 4, 2013 12:33 PM, "Gustavo Lopes" <glopes@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 true that 0 is neither positive or negative, but I don't think "accepts a leading sign, except if it's 0" is a good option. It's an unnecessary special case. > I fully agree. Cheers, Pierre

« previous php.internals (#65630) next »