Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP is_bool() Function

PHP is_bool() Function

PHP Available FunctionsAvailable PHP Functions

is_bool() The function is used to check whether a variable is of boolean type.

PHP version requirement: PHP 4, PHP 5, PHP 7

Syntax


bool is_bool ( mixed $var )

Parameter Description:

Return Value

If var is boolean, returns TRUE.

Example

Example

The output is:


变量 a 是布尔型

PHP Available FunctionsAvailable PHP Functions