title: Case-inconsistency of PHP file paths on Mac / MAMP?
body: <p>I'm developing a PHP program on MAMP, and just realized the following screwy behavior:</p>
  
  <pre><code>echo "&lt;br/&gt;PATH = ".dirname(__FILE__);
  include 'include.php';
  </code></pre>
  
  <p><strong>include.php:</strong></p>
  
  <pre><code>&lt;?php
  echo "&lt;br/&gt;PATH = ".dirname(__FILE__);
  ?&gt;
  </code></pre>
  
  <p><strong>Result:</strong></p>
  
  <blockquote>
    <p>PATH = /users/me/stuff/mamp_server/my_site (All lower case) </p>
    
    <p>PATH = /Users/me/Stuff/mamp_server/my_site  (Mixed case)</p>
  </blockquote>
  
  <p>What is causing this inconsistent behavior, and how can I protect against it?  (Note that I can't just convert everything to lowercase, because the application is destined for a Linux server, where file paths are case sensitive. ) </p>
  
  <p><strong>Update:</strong></p>
  
  <p>This problem exists for <code>__FILE__</code> and <code>__DIR__</code>. </p>
  
  <p>It looks like this might be a real problem with no work around... going to file a bug report unless I hear otherwise.</p>
  
  <p><strong>Bug report:</strong></p>
  
  <p><a href="https://bugs.php.net/bug.php?id=60017" rel="noreferrer">https://bugs.php.net/bug.php?id=60017</a></p>
  
  <p><strong>Update:</strong> </p>
  
  <p>And another note: If you're doing an absolute path include(...) on Mac, it requires the mixed case version.</p>