andrew
andrew

Reputation: 9583

How to use the options array in filter_input / filter_var

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

Answers (1)

Related Questions