note 114888 added to function.filter-input

From: Date: Mon, 21 Apr 2014 06:50:28 +0000
Subject: note 114888 added to function.filter-input
Groups: php.notes 
Request: Send a blank email to php-notes+get-199307@lists.php.net to get a copy of this message
contrary to what is stated here on the comments on thow to use the options for filters, there is no range option or default... in fact, there is not much option AT ALL. It is not mentioned in the manual anywhere, and the provided code on that comment does nothing with php-5.4.4.. <?php get(GET, 'p', FILTER_VALIDATE_INT, array('options'=>array('default'=>5, 'min_range'=>0, 'max_range'=>9)) ); // ?p=30 => 30 // ?p="123" => 123 // ?p=-23 => -23 // ?p=asdf => null ?> ---- Server IP: 72.52.91.14 Probable Submitter: 108.23.214.103 ---- Manual Page -- http://php.net/manual/en/function.filter-input.php Edit -- https://master.php.net/note/edit/114888 Del: integrated -- https://master.php.net/note/delete/114888/integrated Del: useless -- https://master.php.net/note/delete/114888/useless Del: bad code -- https://master.php.net/note/delete/114888/bad+code Del: spam -- https://master.php.net/note/delete/114888/spam Del: non-english -- https://master.php.net/note/delete/114888/non-english Del: in docs -- https://master.php.net/note/delete/114888/in+docs Del: other reasons-- https://master.php.net/note/delete/114888 Reject -- https://master.php.net/note/reject/114888 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#199307) next »