note 126028 added to function.filter-var
| From: | rschuetz at hmcw dot com | Date: | Thu, 22 Apr 2021 06:59:14 +0000 |
| Subject: | note 126028 added to function.filter-var | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216310@lists.php.net to get a copy of this message | ||
I cannot confirm what yactouat said. As of PHP 7.3, 0 will not be filtered out with
FILTER_VALIDATE_INT. It correctly returns 0, not false. Of course you have to check the return value
with an identity operator. Otherwise you cannot distinguish between 0 and false.
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 80.135.78.51)
----
Manual Page -- https://php.net/manual/en/function.filter-var.php
Edit -- https://main.php.net/note/edit/126028
Del: integrated -- https://main.php.net/note/delete/126028/integrated
Del: useless -- https://main.php.net/note/delete/126028/useless
Del: bad code -- https://main.php.net/note/delete/126028/bad+code
Del: spam -- https://main.php.net/note/delete/126028/spam
Del: non-english -- https://main.php.net/note/delete/126028/non-english
Del: in docs -- https://main.php.net/note/delete/126028/in+docs
Del: other reasons-- https://main.php.net/note/delete/126028
Reject -- https://main.php.net/note/reject/126028
Search -- https://main.php.net/manage/user-notes.php