PHP is_bool() function

By using this function, we can check whether the variable is boolean variable or not.

Syntax

Parameters

ParameterDescriptionIs compulsory
var_nameThe variable being evaluated.compulsory

Returns

It return True if var is boolean, False otherwise.

Example 1

Output:

PHP Variable Handling is_bool() function

Example 2

Output:

PHP Variable Handling is_bool() function




Latest Courses