Boolean is a data type that can be represented by either
A boolean can be used with conditional statements to determine whether a statement should be executed.
PHP Booelan Example
(boolean) you can explicitly convert other data types to boolean.
PHP Booelan Conversion Example
The logical NOT(
!) used with logical values takes a truthy value turns it to false and vice versa.
PHP Boolean Logical NOT Example
What You Should Know at The End of this Lesson
- You should know about the boolean data type.
- You should know how to convert other data types to boolean.
- You should know how to use the logical NOT to invert logical values.