DWQA QuestionsHow do you use filter_validate_boolean in PHP?
admin_alan4v3v Staff asked 2 years ago

The FILTER_VALIDATE_BOOLEAN filter validates fee as a boolean option.
Possible return values:

  • Returns TRUE for “1”, “true”, “on” and “yes”
  • Returns FALSE for “0”, “false”, “off” and “no”
  • Returns NULL on failure if FILTER_NULL_ON_FAILURE is set.