PHP - OperatorsWhich statement about the logical XOR operator in PHP is true?AXOR returns true if both operands are trueBXOR behaves the same as ORCXOR returns true if both operands are falseDXOR returns true if exactly one operand is trueCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand XOR behaviorXOR returns true only if exactly one operand is true, not both or none.Step 2: Compare with other operatorsAND needs both true, OR needs at least one true, XOR is exclusive OR.Final Answer:XOR returns true if exactly one operand is true -> Option DQuick Check:XOR = true if one true only [OK]Quick Trick: XOR is true only when one operand is true [OK]Common Mistakes:Thinking XOR is same as ORAssuming XOR true if both trueConfusing XOR with AND
Master "Operators" in PHP9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More PHP Quizzes Conditional Statements - If statement execution flow - Quiz 10hard Conditional Statements - Match expression (PHP 8) - Quiz 5medium Conditional Statements - If statement execution flow - Quiz 2easy Conditional Statements - Why conditional flow is needed - Quiz 4medium Loops - Why loops are needed - Quiz 10hard Operators - Null coalescing operator - Quiz 14medium PHP Basics and Execution Model - PHP tags and embedding in HTML - Quiz 1easy PHP Basics and Execution Model - First PHP program (Hello World) - Quiz 1easy PHP Request Lifecycle - How a PHP request starts and ends - Quiz 8hard Type Handling - Loose comparison vs strict comparison - Quiz 3easy