A

Admin • 828.03K Points
Coach

Q. Which magic method is called when an object is converted to string?

  • (A) __string()
  • (B) __toString()
  • (C) __convert()
  • (D) __print()
  • Correct Answer - Option(B)
  • Views: 4
  • Filed under category PHP
  • Hashtags:

Explanation by: Admin
__toString() defines string representation.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.