is_bool(3) php man page | unix.com

Man Page: is_bool

Operating Environment: php

Section: 3

IS_BOOL(3)								 1								IS_BOOL(3)

is_bool - Finds out whether a variable is a boolean

SYNOPSIS
bool is_bool (mixed $var)
DESCRIPTION
Finds whether the given variable is a boolean.
PARAMETERS
o $var - The variable being evaluated.
RETURN VALUES
Returns TRUE if $var is a boolean, FALSE otherwise.
EXAMPLES
Example #1 is_bool(3) examples <?php $a = false; $b = 0; // Since $a is a boolean, it will return true if (is_bool($a) === true) { echo "Yes, this is a boolean"; } // Since $b is not a boolean, it will return false if (is_bool($b) === false) { echo "No, this is not a boolean"; } ?>
SEE ALSO
is_float(3), is_int(3), is_string(3), is_object(3), is_array(3). PHP Documentation Group IS_BOOL(3)
Related Man Pages
boolean(3pm) - centos
gettype(3) - php
empty(3) - php
is_float(3) - php
is_string(3) - php
Similar Topics in the Unix Linux Community
If statement
New to shell script and lost....
awk value return
Deleting Multiple Files With the Same Content
Authentication problems with Active Directory/Samba/Winbind/Pam