In PHP, what does "5" === 5 evaluate to?
Correct answer
D. false
16 views
D. false
16 views
=== 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.
Asked in: NTS, PPSC, PHP Developer Interviews
Not sure why the answer is D? Ask here and get an explanation.