Q. Which magic method is called when an object is created?

  • (A) __create()
  • (B) __make()
  • (C) __construct()
  • (D) __new()
πŸ’¬ Discuss
βœ… Correct Answer: (C) __construct()
Explanation: __construct() is automatically called when an object is created.
Explanation by: Rati Dubey
__construct() is automatically called when an object is created.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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