Bird
0
0

Which of the following statements about strict comparison === in PHP is true?

easy📝 Conceptual Q2 of 15
PHP - Type Handling
Which of the following statements about strict comparison === in PHP is true?
AIt compares both value and type without conversion.
BIt only compares types, ignoring values.
CIt compares values after converting types.
DIt always returns true for numeric strings.
Step-by-Step Solution
Solution:
  1. Step 1: Recall strict comparison rules

    Strict comparison === checks both value and type exactly, no conversion.
  2. Step 2: Analyze options

    Only option stating no conversion and both value and type checked is correct.
  3. Final Answer:

    It compares both value and type without conversion. -> Option A
  4. Quick Check:

    Strict comparison checks type and value [OK]
Quick Trick: === checks type and value exactly [OK]
Common Mistakes:
  • Assuming === converts types
  • Believing === ignores type
  • Confusing === with == behavior

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PHP Quizzes