FILTER_VALIDATE_INT and +0/-0

From: Date: Sun, 03 Feb 2013 18:15:59 +0000
Subject: FILTER_VALIDATE_INT and +0/-0
Groups: php.internals 
Request: Send a blank email to internals+get-65577@lists.php.net to get a copy of this message
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? Or should the documentation be adjusted to reflect the new behavior? - Martin

« previous php.internals (#65577) next »