Bird
0
0

Which logical operator in PHP returns true if at least one of the conditions is true?

easy📝 Conceptual Q1 of 15
PHP - Operators
Which logical operator in PHP returns true if at least one of the conditions is true?
A|| (OR)
B&& (AND)
C! (NOT)
Dxor
Step-by-Step Solution
Solution:
  1. Step 1: Understand the OR operator

    The OR operator (||) returns true if any one of the conditions is true.
  2. Step 2: Compare with other operators

    AND (&&) requires both true, NOT (!) negates, xor returns true if exactly one is true.
  3. Final Answer:

    || (OR) -> Option A
  4. Quick Check:

    Logical OR = || (OR) [OK]
Quick Trick: OR returns true if any condition is true [OK]
Common Mistakes:
  • Confusing AND with OR
  • Using xor instead of OR
  • Misunderstanding NOT operator

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PHP Quizzes