Q. Which design pattern is used by DB::get_connection()?

  • (A) Factory
  • (B) Singleton
  • (C) Observer
  • (D) Builder
πŸ’¬ Discuss
βœ… Correct Answer: (B) Singleton
Explanation: It returns the same PDO instance (singleton).
Explanation by: Roshan
It returns the same PDO instance (singleton).

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
8
Total Visits
πŸ“½οΈ
2 mo ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
94%
Success Rate