On Sun, 3 Feb 2013, Martin Jansen wrote:

> Back in December I submitted a pull request to make FILTER_VALIDATE_INT
> accept +0/-0. That request was merged into php-src:
> 
> https://github.com/php/php-src/pull/248
> 
> The other day I then stumbled upon a note on
> http://www.php.net/manual/en/filter.filters.validate.php saying "Numbers
> +0 and -0 are not valid integers but validate as floats.", which makes
> me wonder if the previous behavior (rejecting +0/-0) was on purpose
> rather than by mistake?

+0 and -0 don't make sense for integers, where there is only 0. Allowing 
only 0 was on purpose.

Derick

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to