is_bool

PHP 4, PHP 5, PHP 7, PHP 8
is_bool - Finds out whether a variable is a boolean
Manual
Code Examples

is_bool( mixed$value ): bool

Finds whether the given variable is a boolean.

Parameters

value

The variable being evaluated.

Return Values

Returns true if value is a bool, false otherwise.

Related Functions

Example of is_bool

Show all examples for is_bool

PHP Version: