PHP - Variables and Data TypesWhich of the following is a valid way to assign a boolean value in PHP?AAll of the aboveB$flag = True;C$flag = TRUE;D$flag = true;Check Answer
Step-by-Step SolutionSolution:Step 1: Check boolean assignment syntaxPHP boolean literals are case-insensitive: true, TRUE, True all work.Step 2: Confirm all options are validAll given assignments are valid boolean assignments in PHP.Final Answer:All of the above -> Option AQuick Check:Boolean literals are case-insensitive [OK]Quick Trick: Boolean true/false are case-insensitive in PHP [OK]Common Mistakes:Thinking only lowercase true is validConfusing PHP with case-sensitive languages
Master "Variables and Data Types" in PHP9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More PHP Quizzes Arrays - Associative array creation - Quiz 7medium Functions - Default parameter values - Quiz 11easy Loops - For loop execution model - Quiz 9hard Operators - Logical operators - Quiz 11easy Operators - Assignment and compound assignment - Quiz 15hard Output and String Handling - Print statement - Quiz 9hard PHP Basics and Execution Model - What is PHP - Quiz 8hard Variables and Data Types - Integer type and behavior - Quiz 3easy Variables and Data Types - Why variables are needed in PHP - Quiz 3easy Variables and Data Types - Null type and its meaning - Quiz 2easy