I'm building a PHP site mainly via peaking at other peoples code. The code in particular I'm attempting to mimic has this line of code at the bottom of almost all of their .PHP files that have anything to do with SQL connections...
// Never forget to close the connection, otherwise memory leaks will happen!
mysqli_close($dbConnection);
So my question is; does his comment have some merit? Should I always be closing my mysqli
connections in this fashion in all of my PHP files? Or would that be wasting my time, and does it happen automatically or something?
Thanks in advance!