Re: FILTER_VALIDATE_INT and +0/-0
| From: | Patrick Schaaf | Date: | Mon, 04 Feb 2013 09:50:40 +0000 |
| Subject: | Re: FILTER_VALIDATE_INT and +0/-0 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-65622@lists.php.net to get a copy of this message | ||
> +0 and -0 don't make sense for integers, where there is only 0. Allowing
> only 0 was on purpose.
+0 and -0 are accepted by sscanf('%d'), intval(), and (int).
+0 is produced by sprintf('%+d')
Thus, the change to FILTER_VALIDATE_INT seems to make sense.
best regards
Patrick