I'm not sure what's wrong here. For some reason is\_dir function not working properly for me.

```
class A
{
  private $path

  public function setPath($path)
  {
     if(!is_dir(!$path)){
      throw new Exception('Invalid path');
    }

  }
}

$obj = new A;
$obj->setPath('/usr/htdocs/site/');

```

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?