How to validate value is Boolean in Php?
In this post, This function checks whether a variable is of type boolean or not.
1. Code:
";
var_dump(checkTheValueIsBoolean("on"));
?>
2. Example:
Input:
input: "off" Input: "on" input: "a"
Output:
output: true output: true output: false