This function determines whether the provided value is a bool or not.
This function does not generate an event.
This function has a deprecated alias isbool
which will be removed in the next minor release.
is_bool(value)
Argument | Type | Description |
---|---|---|
value | any (required) | The value to be tested. |
Returns true
if the given value is a boolean, else it returns false
.
This code shows some return values for is_bool():
[
is_bool( true ),
is_bool( 'true' ),
is_bool( nil ),
];
Return value in JSON format
[
true,
false,
false
]