Hi guys

I'm creating a user class with methods like login, registration, etc.. I'm going to use PDO instead of using the standard mysql functions.

My question is, do I have to declare a new object of PDO globally in the beginning or to use something like a separate class for it with single tone pattern ?

I found this link saying about it : http://php.net/manual/en/language.oop5.patterns.php

As you are the professionals, I would like to know the professional approach when using PDO.

Thanks