title: require() reports that no such directory exists, but file_exists returns true on the exact same path
body: <p>I have a very simple PHP file that is part of a unit test with PHPUnit, and I am getting an issue where require() reports back that it is unable to open the stream because no such file exists, but yet, on the next line tests if the file_exists and this returns true?</p>
  <pre><code>&lt;?php
  $inc1 = $_SERVER['DOCUMENT_ROOT'].'/vendor/autoload.php';
  require $inc1;
  if (file_exists($inc1)){
      echo &quot;yes&quot;;
  }else
  {
      echo &quot;no&quot;;
  }
  </code></pre>
  <p>What could be causing this behavior and for this to not work?</p>
  <p>The exact error being returned by the console is:</p>
  <pre><code>Warning: require(/vendor/autoload.php): failed to open stream: No such file or directory in /Users/REDACTED/Documents/Github/XXX/tests/inc/emailSendTest.php on line 3
  
  Fatal error: require(): Failed opening required '/vendor/autoload.php' (include_path='.:') in /Users/REDACTED/Documents/Github/XXX/tests/inc/emailSendTest.php on line 3
  </code></pre>