Answers for "php if variable is boolean"

PHP
0

php is boolean

The is_bool() function checks whether a variable is a boolean or not. This function returns true (1) if the variable is a boolean, otherwise it returns false/nothing.
Posted by: Guest on March-11-2021
0

php check if variable is true or false

Testing $var == true is the same than just testing $var.

You can read this SO question on comparison operator. You can also read PHP manual on this topic.

Note: a variable does not return true. It is true, or it evaluates to true. However, a function returns true.
Posted by: Guest on March-01-2021

Code answers related to "php if variable is boolean"

Browse Popular Code Answers by Language