title: Do SQL connections opened with PDO in PHP have to be closed
body: <p>When I open a MySQL connection in PHP with just PHP's built-in MySQL functions, I do the following:</p>
  
  <pre><code>$link = mysql_connect($servername, $username, $password);
  mysql_select_db($dbname);
  //queries etcetera
  mysql_close($link);
  </code></pre>
  
  <p>When I open a connection with PDO, it looks like this:</p>
  
  <pre><code>$link = new PDO("mysql:dbname=$dbname;host=$servername",$username,$password);
  //prepare statements, perform queries
  </code></pre>
  
  <p>Do I have to explicitly close the connection like I do with <code>mysql_connect()</code> and <code>mysql_close()</code>?  If not, how does PHP know when I'm done with my connection?</p>
  
  <p>TIA.</p>