note 97491 added to function.filter-input-array
| From: | Anonymous at osu1 dot php dot net | Date: | Thu, 22 Apr 2010 19:12:35 +0000 |
| Subject: | note 97491 added to function.filter-input-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168521@lists.php.net to get a copy of this message | ||
Beware: if none of the arguments is set, this function returns NULL, not an array of NULL values.
/* No POST vars set in request
$_POST = array();
*/
$args = array('some_post_var' => FILTER_VALIDATE_INT);
$myinputs = filter_input_array(INPUT_POST, $args);
var_dump($myinputs);
Expected Output: array(1) { ["some_post_var"]=> NULL }
Actual Output: NULL
----
Server IP: 69.147.83.197
Probable Submitter: 128.2.223.26
----
Manual Page -- http://www.php.net/manual/en/function.filter-input-array.php
Edit -- https://master.php.net/note/edit/97491
Del: integrated -- https://master.php.net/note/delete/97491/integrated
Del: useless -- https://master.php.net/note/delete/97491/useless
Del: bad code -- https://master.php.net/note/delete/97491/bad+code
Del: spam -- https://master.php.net/note/delete/97491/spam
Del: non-english -- https://master.php.net/note/delete/97491/non-english
Del: in docs -- https://master.php.net/note/delete/97491/in+docs
Del: other reasons-- https://master.php.net/note/delete/97491
Reject -- https://master.php.net/note/reject/97491
Search -- https://master.php.net/manage/user-notes.php