So, I know that with PHP you can define optional parameters (StackOverflow Questions).
What I'm trying to do is the following:
function myFunc($a, $b, $c, $type, $variable_name, $filter, $options)
{
$value = filter_input($type, $variable_name, $filter, $options);
//Do something with $a, $b, $c, and $value
}
Since I am passing in parameters that pertain to the built in function of filter_input
I know that $filter and $options are optional parameters, and to make them optional I would simply assign them a default value. But, I'm not sure what that default value should be. My guess is that $filter should default to FILTER_DEFAULT
, which makes sense, but I can not find any information as to what $options should default to.