filter_var_array
PHP 5 >= 5.2.0, PHP 7, PHP 8
filter_var_array - Gets multiple variables and optionally filters them
Code Examples
Example #1 A filter_var_array example
Result: array(6) {
["product_id"]=>
string(17) "libgd%3Cscript%3E"
["component"]=>
array(1) {
[0]=>
int(10)
}
["versions"]=>
string(6) "2.0.33"
["doesnotexist"]=>
NULL
["testscalar"]=>
bool(false)
["testarray"]=>
array(1) {
[0]=>
int(2)
}
}