Enter your Sign-on user name and password.

Forgot password?
  • Follow us on:
Loading video...

Start Learning Now

Our free lessons will get you started (Flash® 10 required).
Get immediate access to our entire library.

Sign up for Educator.com

Features Overview

  • Get on-demand access to our complete library
  • Search and jump to exactly what you need to learn
  • Track your progress
  • Download practice and lesson files
  • *Ask questions and get answers from our community & instructors

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.

Computer Science: Introduction to PHP