Reputation: 9583
Does anyone know where I can find a list of possible keys for the options array in filter_input()
or filter_var()
?
I found an example Here which has some possible values as shown below
$options = array(
'options' => array(
'default' => 3, // value to return if the filter fails
// other options here
'min_range' => 0
),
'flags' => FILTER_FLAG_ALLOW_OCTAL,
);
There was also a brief mention here: How to add an option and a flag to filter_input
I've searched high and low for a complete list with no luck.
Edit
Found this too: php filter var returning a wrong result
perhaps array('min_range'=>'','max_range'=>'','default'=>'');
are the only possibilities?
Upvotes: 5
Views: 4874
Reputation: 429
All filters are documented
http://php.net/manual/en/filter.filters.php
Which leads to the following:
there is an "options" column in the "sanitize", "validate" and "misc" filters
Upvotes: 4