I have been working on a PHP project where I need to monitor the connection statistics for my database connections. While going through the PHP documentation, I stumbled upon a function called `get_connection_stats()`, which seems to be exactly what I need.
I have a few questions regarding this function and I was hoping someone here could help me out. Firstly, I would like to understand the purpose of the `get_connection_stats()` function. What exactly does it do? Is it used to retrieve information about the current database connection?
Moreover, I would really appreciate it if someone could provide me with an example of how to use this function. I am looking for a code snippet that demonstrates the usage of `get_connection_stats()` in a practical scenario. It would be great if you could explain the different parameters that can be passed to this function and their significance.
Additionally, I am curious to know if this function is compatible with all database extensions in PHP, such as MySQL, PostgreSQL, and SQLite. If not, which extensions does it work with?
Thank you in advance for your help and guidance.