Generic Filter Flags
No flags.
Constants
FILTER_FLAG_NONE(int)No flags.
FILTER_REQUIRE_SCALAR(int)Flag used to require the input of the filter to be a scalar.
FILTER_REQUIRE_ARRAY(int)Flag used to require the input of the filter to be an
array.FILTER_FORCE_ARRAY(int)This flag wraps scalar inputs into a one element
arrayfor filters which operate on arrays.FILTER_NULL_ON_FAILURE(int)Use null instead of false on failure.
Usable with any validation
FILTER_VALIDATE_*filter.FILTER_THROW_ON_FAILURE(int)Throws a
Filter\FilterFailedExceptionwhen a validation filter fails, instead of returning false.Can be used with any validation
FILTER_VALIDATE_*filter.Available as of PHP 8.5.0.