note 96058 added to function.filter-var

From: Date: Fri, 05 Feb 2010 20:04:46 +0000
Subject: note 96058 added to function.filter-var
Groups: php.notes 
Request: Send a blank email to php-notes+get-165695@lists.php.net to get a copy of this message
@Arvid Your second example is incorrect/misleading... This is actually telling you that --> '0' <-- is NOT a valid boolean... In this example, you're asking if the string 0 is a boolean, which it is not: filter_var('0', FILTER_VALIDATE_BOOLEAN); We can see this by: var_dump('0'); var_dump(0); var_dump(false); Which returns: string(1) "0" int(0) bool(false) ---- Server IP: 208.69.120.55 Probable Submitter: 209.98.85.81 ---- Manual Page -- http://www.php.net/manual/en/function.filter-var.php Edit -- https://master.php.net/note/edit/96058 Del: integrated -- https://master.php.net/note/delete/96058/integrated Del: useless -- https://master.php.net/note/delete/96058/useless Del: bad code -- https://master.php.net/note/delete/96058/bad+code Del: spam -- https://master.php.net/note/delete/96058/spam Del: non-english -- https://master.php.net/note/delete/96058/non-english Del: in docs -- https://master.php.net/note/delete/96058/in+docs Del: other reasons-- https://master.php.net/note/delete/96058 Reject -- https://master.php.net/note/reject/96058 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#165695) next »