Uppercase Booleans vs. Lowercase in PHP Last Updated : 11 Feb, 2019 Comments Improve Suggest changes Like Article Like Report The boolean expresses the truth value. The Boolean represents two possible values: TRUE or FALSE. True can be given a value of 1, and False is given a value of zero. To specify a boolean literal, use the constants TRUE or FALSE. Both are case-insensitive. It means that TRUE is equal to true and FALSE is equal to false. So it can be written as true === TRUE and false === FALSE Example 1: This example display the value of uppercase and lowercase boolean. php <?php // PHP program to illustrates // boolean value // Declare a variable and initialize it $boolean = TRUE; // Display the value of variable echo $boolean . "\n"; // Declare a variable and initialize it $boolean = true; // Display the value of variable echo $boolean; ?> Output: 1 1 Example: This example compare the uppercase and lowercase boolean value. php <?php // PHP program to illustrates // boolean value // Declare a variable and initialize it $var1 = TRUE; $var2 = true; // Check both boolean value is same or not if($var1 == $var2) echo "TRUE and true both are same \n"; else echo "TRUE and true both are different \n"; // Declare a variable and initialize it $var1 = FALSE; $var2 = false; // Check both boolean value is same or not if($var1 == $var2) echo "FALSE and false both are same \n"; else echo "FALSE and false both are different \n"; ?> Output: TRUE and true both are same FALSE and false both are same Comment More infoAdvertise with us Next Article Uppercase Booleans vs. Lowercase in PHP S shruti1399 Follow Improve Article Tags : Web Technologies PHP PHP Programs Similar Reads Ternary operator vs Null coalescing operator in PHP Ternary Operator Ternary operator is the conditional operator which helps to cut the number of lines in the coding while performing comparisons and conditionals. It is an alternative method of using if else and nested if else statements. The order of execution is from left to right. It is absolutely 3 min read PHP Program to Check if a String Contains Uppercase, Lowercase, Special Characters and Numeric Values Given a String, the task is to check whether the given string contains uppercase, lowercase, special characters, and numeric values in PHP. When working with strings in PHP, it's often necessary to determine the presence of certain character types within the string, such as uppercase letters, lowerc 3 min read Double not (!!) operator in PHP The "NOT NOT" operator or Double not(!!) operator in PHP simply returns the truth value of the variable or expression. To explain in very simple terms, the first not operator(!) negates the expression. The second not operator(!) again negates the expression resulting the true value which was present 2 min read When to use static vs instantiated classes in PHP? Prerequisite - Static Function PHP In PHP, we can have both static as well as non-static (instantiated) classes. Static class Introduction: A static class in PHP is a type of class which is instantiated only once in a program. It must contain a static member (variable) or a static member function (m 5 min read PHP | Ternary Operator If-else and Switch cases are used to evaluate conditions and decide the flow of a program. The ternary operator is a shortcut operator used for shortening the conditional statements. ternary operator: The ternary operator (?:) is a conditional operator used to perform a simple comparison or check on 3 min read Like