title: is_dir says dir not exists but it exists
body: <p>I'm not sure what's wrong here. For some reason is_dir function not working properly for me.</p>
  
  <pre><code>class A
  {
    private $path
  
    public function setPath($path)
    {
       if(!is_dir(!$path)){
        throw new Exception('Invalid path');
      }
  
    }
  }
  
  $obj = new A;
  $obj-&gt;setPath('/usr/htdocs/site/');
  </code></pre>
  
  <p>After this line of code the exception Invalid path is thrown. I checked and the /usr/htdocs/site/ path exists. What could be the problem?</p>