Home > PHP > Function > Variable handling > is_bool()

is_bool()

is_bool - Finds out whether a variable is a boolean

Syntax

bool is_bool (mixed $var)

Arguments

  • var - The variable being evaluated.

Description

Finds whether the given variable is a boolean.

Version

PHP 4, 5

Return value

Returns TRUE if var is a boolean, FALSE otherwise.