Programming Languages PHP Objective
Mar 15, 2013

What happens if you add a string to an integer using the + operator?

Choose the correct answer:
A) The interpreter outputs a type mismatch error
B) The string is converted to a number and added to the integer
C) The string is discarded and the integer is preserved
D) The integer and string are concatenated together in a new string
Detailed Explanation

Option B is the right answer.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback