Loading video...
Boolean & Null Data Types
- The boolean data type is a scalar data type used to represent a truth value: either true or false.
- There are only two boolean literals: the special keywords TRUE and FALSE .
- Comparison operators are binary operators used to compare two expressions. The result of a comparison operation is a boolean value.
- There are several comparison operators:
- Equal: (==)
- Not Equal: (!=)
- Greater Than: (>)
- Less Than: (<)
- Greater Than or Equal to: (>=)
- Less Than or Equal to: (<=)
- Identical: (===)
- Not Identical: (!==)
- The identical and not identical operators compare BOTH the value and data type of their operands. All of the the operators compare their operands based on value only.
- The null data type is a special data type that is used for variables that have no data value assigned to them.
- There is one null literal, which is the special keyword NULL .
- A variable can only be of the null data type if it has been specifically assigned
the literal NULL , or if:
- the variable has not yet been assigned a value, or
- if the variable has been ‘unset’ using the unset() construct
- Additional Resources:
Boolean & Null Data Types
Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.


































Start Learning Now
Our free lessons will get you started (Flash® 10 required).
Sign up for Educator.comGet immediate access to our entire library.
Features Overview