note 123858 added to function.filter-var
| From: | yactouat at hotmail dot com | Date: | Sat, 18 May 2019 14:47:09 +0000 |
| Subject: | note 123858 added to function.filter-var | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-211060@lists.php.net to get a copy of this message | ||
While getting familiar with filter_var( $var, FILTER_VALIDATE_INT ), I found interesting that 0 will
be filtered out and therefore wont be considered as an int. Hope that helps someone not to be stuck
;)
N.B.: if you need to accept 0's, you could use is_int()
----
Server IP: 208.43.231.9
Probable Submitter: 185.85.3.195 (proxied: 90.126.112.138)
----
Manual Page -- http://php.net/manual/en/function.filter-var.php
Edit -- https://master.php.net/note/edit/123858
Del: integrated -- https://master.php.net/note/delete/123858/integrated
Del: useless -- https://master.php.net/note/delete/123858/useless
Del: bad code -- https://master.php.net/note/delete/123858/bad+code
Del: spam -- https://master.php.net/note/delete/123858/spam
Del: non-english -- https://master.php.net/note/delete/123858/non-english
Del: in docs -- https://master.php.net/note/delete/123858/in+docs
Del: other reasons-- https://master.php.net/note/delete/123858
Reject -- https://master.php.net/note/reject/123858
Search -- https://master.php.net/manage/user-notes.php