i started learning OOP and i came across with this thing called "Single instace or Singleton", i want to build my db.php this way, and i found this code on github
gist.github.com/skhani/5aebd11015881fb3d288 also in other places have similar code. There's a lot of code just to make a simple thing (i guess), so i changed it to this:
pastebin.com/KKqnbnQN and i get the desired result (single instance), anyways, the way i did it is correct? From the point of view of OOP.