Q. Which magic method is used to create a string representation of an object

  • (A) to string
  • (B) construct
  • (C) destruct
  • (D) get
πŸ’¬ Discuss
βœ… Correct Answer: (A) to string
Explanation: to string magic method is used when an object is treated like a string
Explanation by: Rati Dubey
to string magic method is used when an object is treated like a string

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
91
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
82%
Success Rate