title: How to check if a defined constant exists in PHP?
body: <p>So I'm using a PHP framework called <strong>fuelphp</strong>, and I have this page that is an <strong>HTML</strong> file, so I can't use PHP in it. I have another file that has a top bar in it, which my HTML file will call through ajax.  </p>
  
  <p>How do I check if a constant exists in PHP?<br>
  I want to check for the the fuelphp framework file locations.</p>
  
  <p>These are the constants I need to check for (actually, I only have to check one of them):</p>
  
  <pre><code>define('DOCROOT', __DIR__.DIRECTORY_SEPARATOR);
      define('APPPATH', realpath(__DIR__.'/fuel/app/').DIRECTORY_SEPARATOR);
      define('PKGPATH', realpath(__DIR__.'/fuel/packages/').DIRECTORY_SEPARATOR);
      define('COREPATH', realpath(__DIR__.'/fuel/core/').DIRECTORY_SEPARATOR);                    
      require APPPATH.'bootstrap.php';
  </code></pre>
  
  <p><strong>edit:</strong><br />
  I realized that these aren't variables they are constants...</p>