title: Should I manually close DB Connection and Statement's cursor's after a fetch?
body: <p>I'm building something with Silex and <a href="http://silex.sensiolabs.org/doc/providers/doctrine.html" rel="nofollow">Doctrine DBAL</a> using a Mysql database.</p>
  
  <p>I was wondering if it considered best practice to close the cursor of a statement and database connection after one's done it. For example: </p>
  
  <pre><code>$sql = '
      SELECT
          `id`, `userid`, `name`, `content` 
      FROM 
          `pages` p 
      WHERE 
          p.`userid` in (?)'; 
  
  $stmt = $conn-&gt;executeQuery(
      $sql,
      [$userIds],
      [\Doctrine\DBAL\Connection::PARAM_INT_ARRAY]
  );
  
  $rows = $stmt-&gt;fetchAll();
  
  $stmt-&gt;closeCursor();
  
  $conn-&gt;close();
  </code></pre>
  
  <p>I can't find any examples of this. Both the Silex and Doctrine doc's don't use the statements but they're there for a reason right? </p>