A

Admin • 833.24K Points
Coach

Q. What will be the output of the following code?

Code:
echo 2 + '3 days';
  • (A) 5
  • (B) 23 days
  • (C) Error
  • (D) 2
  • Correct Answer - Option(A)
  • Views: 20
  • Filed under category PHP
  • Hashtags:

Explanation by: Admin

PHP converts the string '3 days' to integer 3 and adds it to 2.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.