title: How to catch require_once/include_once exception?
body: <p>I'm trying to write code similar this:</p>
  
  <pre><code>&lt;?php
  $includes = array(
      'non_existing_file.php', //This file doesn't exist.
  );
  
  foreach ($includes as $include) {
      try {
          require_once "$include";
      } catch (Exception $e) {
          $message = $e-&gt;getMessage();
          echo "
              &lt;strong&gt;
                &lt;font color=\"red\"&gt;
                  A error ocurred when trying to include '$include'.
                  Error message: $message
                &lt;/font&gt;
              &lt;/strong&gt;
          ";
      }
  }
  </code></pre>
  
  <p>I'd tried <code>require_once</code> and <code>include_once</code>, but <code>try catch</code> doesn't catch the exception.</p>
  
  <p>How could I catch this <strong>fatal errors/warning</strong> exceptions?</p>