A boolean presents a truth value that can be either true or false.
$complete = true;
Boolean is usually used in a loop or a condition.
if ($complete) {
// do something
} else {
// do something else
}
We can convert other data types to boolean.
Example
When a boolean is cast into a string, false becomes an empty string, while true becomes 1.
$complete = true;
echo($complete); // 1
var_dump($complete); // bool(true)