The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
FILTER_FLAG_NONE
No flags.
FILTER_REQUIRE_SCALAR
Flag used to require the input of the filter to be a scalar.
FILTER_REQUIRE_ARRAY
Flag used to require the input of the filter to be an array.
FILTER_FORCE_ARRAY
This flag wraps scalar inputs into a one element array for filters which operate on arrays.
FILTER_NULL_ON_FAILURE
Use null instead of false on failure.
null
false
Usable with any validation FILTER_VALIDATE_* filter.
FILTER_VALIDATE_*
FILTER_THROW_ON_FAILURE
Throws a Filter\FilterFailedException when a validation filter fails, instead of returning false.
Can be used with any validation FILTER_VALIDATE_* filter.
Available as of PHP 8.5.0.