title: Close all the opened files at once in php
body: <p>Is there any way to close all the files that are open in the program without using fclose() for each file separately?</p>
  
  <p>Something like this-</p>
  
  <pre><code>$txt_template1 = fopen("1.txt", "r") or die("Unable to open file!");
  $txt_template2 = fopen("2.txt", "r") or die("Unable to open file!");
  $txt_template3 = fopen("3.txt", "r") or die("Unable to open file!");
  $txt_template4 = fopen("4.txt", "r") or die("Unable to open file!");
  $txt_template5 = fopen("5.txt", "r") or die("Unable to open file!");
  $txt_template6 = fopen("6.txt", "r") or die("Unable to open file!");
  
  fclose(ALL_OPEN_FILES);
  </code></pre>