This question already has an answer here:
Outline by Php.net, you can create a presistent database connection, but i am wondering why would I use this method when I could create a singleton class that instantiates the db connection and exposes it by some function?
</div>
A non-persistent singelton connection (PDO) is getting closed at the end of the script (response). Persistent connections are not closed at the end of the script, but are cached and re-used when another script requests a connection using the same credentials. A persistent connection can cause unwanted side-effects and security issues.
What are the disadvantages of using persistent connection in PDO