Why Do We Check Whether Driver Object Has Already Exists

[Solved] Why Do We Check Whether Driver Object Has Already Exists | Php - Code Explorer | yomemimo.com
Question : why do we check whether driver object has already exists

Answered by : obedient-ocelot-5tkogtygmlyl

 (if driver==null)
This is because of singleton pattern.
It will not create object of the class
again if already initialized once.

Source : | Last Update : Thu, 21 Jan 21

Answers related to why do we check whether driver object has already exists

Code Explorer Popular Question For Php