note 130474 added to function.filter-var

From: Date: Mon, 08 Sep 2025 11:14:09 +0000
Subject: note 130474 added to function.filter-var
Groups: php.notes 
Request: Send a blank email to php-notes+get-222335@lists.php.net to get a copy of this message
Note that: when using FILTER_VALIDATE_INT, if the variable is zero, the "if" will be false. <?php $var = 0; if (!filter_var($var, FILTER_VALIDATE_INT)){ echo "Zero = false"; } else { echo 'Will not pass here"; } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.84.18 (proxied: 200.153.25.250) ---- Manual Page -- https://php.net/manual/en/function.filter-var.php Edit -- https://main.php.net/note/edit/130474 Del: integrated -- https://main.php.net/note/delete/130474/integrated Del: useless -- https://main.php.net/note/delete/130474/useless Del: bad code -- https://main.php.net/note/delete/130474/bad+code Del: spam -- https://main.php.net/note/delete/130474/spam Del: non-english -- https://main.php.net/note/delete/130474/non-english Del: in docs -- https://main.php.net/note/delete/130474/in+docs Del: other reasons-- https://main.php.net/note/delete/130474 Reject -- https://main.php.net/note/reject/130474 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#222335) next »