Practice mode PHP

Which PHP operator returns true only when both operands have the same value and the same type?

Correct answer C. ===

Explanation

The identity operator === compares both value and type, so 5 === "5" is false, while the loose comparison 5 == "5" is true.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.