1. Home
  2. Computer Science MCQs
  3. PHP
  4. In PHP, what does "5" === 5 evaluate to?

Added 2 Nov 2026

In PHP, what does "5" === 5 evaluate to?

  1. null
  2. 5
  3. true
  4. false Correct answer

Correct answer

D. false

16 views

MCQSEXAM

Explanation

=== checks both value and type. A string and an integer are different types, so the result is false. Loose "5" == 5 is true because of type juggling.

Reference

Asked in: NTS, PPSC, PHP Developer Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More PHP MCQs

Practise all PHP MCQs

Similar MCQs