mysql + PHP - use or not use mysqli_close ()

3

I noticed now that I'm not using the mysqli_close() function indicated on the PHP.NET site

I monitor the connections through Workbench client conections and do not get open connections, my question is if this way that I'm programming without using this function I'm prone to some kind of problem in the future type fulnerability, error, or some other type of problem?     

asked by anonymous 02.09.2015 / 16:35

1 answer

4

Connections that are not persistent close themselves at the end of the script in theory you do not need to close it.

But if your script takes a long time to run, it's interesting that you close the connection after you use it so you do not keep it running while the script runs.

This is also good when your server has a limited number of database connections.

    
02.09.2015 / 17:34