DWQA QuestionsHow do you use filter_validate_boolean in PHP?
Tamil Amuthan Staff asked 4 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.