title: What is the best way to store configuration variables in PHP?
body: <p>I need to store a bunch of configuration information in PHP.</p>
  
  <p>I have considered the following....</p>
  
  <pre><code>// Doesn't seem right.
  $mysqlPass = 'password'; 
  
  // Seems slightly better.
  $config = array(
       'mysql_pass' =&gt; 'password'
  );
  
  // Seems dangerous having this data accessible by anything. but it can't be
  // changed via this method.
  define('MYSQL_PASSWORD', 'password'); 
  
  // Don't know if this is such a good idea.
  class Config
  {
      const static MYSQL_PASSWORD = 'password';
  }     
  </code></pre>
  
  <p>This is all I have thought of so far. I intend to import this configuration information into my application with <code>require /config.inc.php</code>.</p>
  
  <p>What works for you with regard to storing configuration data, and what are best practices concerning this?</p>