Q. How do you create an object in PHP?

  • (A) new ClassName();
  • (B) create ClassName();
  • (C) object ClassName();
  • (D) build ClassName();
πŸ’¬ Discuss
βœ… Correct Answer: (A) new ClassName();
Explanation: Objects are created using the 'new' keyword followed by the class name.
Explanation by: Rati Dubey
Objects are created using the 'new' keyword followed by the class name.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
104
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
96%
Success Rate