title: Fatal error: Cannot declare class Error, because the name is already in use
body: <p>I don't understand why my machine running PHP 7.2.9 gives this error:</p>
  
  <blockquote>
    <p>Fatal error: Cannot declare class Error, because the name is already in use in controllers\error.php on line 3</p>
  </blockquote>
  
  <p>I have a file named <code>controllers/error.php</code> which contains:</p>
  
  <pre><code>&lt;?php
  
  class Error {
  
      function __construct() {
          echo 'Error: 404 not found the file.';
      }
  
  }
  </code></pre>
  
  <p>Meanwhile, I have a file named <code>/index.php</code> which contains:</p>
  
  <pre><code>require "controllers/error.php";
  $controller = new Error;
  </code></pre>
  
  <p>Even if I change from <code>require</code> to <code>require_once "controllers/error.php"</code>,  it still keeping reporting the same message.</p>