Table of Contents

    Booleans in PHP: Understanding Logical Values

    Booleans in PHP: Understanding Logical Values

    A Boolean represents two possible states: TRUE or FALSE.

    Syntax:

    
    
    $x = true;
    $y = false;
    
    

    Booleans are often used in conditional testing. You will learn more about conditional testing in a later chapter of this tutorial.