private function inPath($dir)
    {
        $PATH = getenv('PATH');
        $realpath = realpath($dir);
        if (!$PATH || !$realpath) {
            return false;
        }

        return in_array($realpath, explode(':', $PATH));
    }
private function inPath($dir)
    {
        $PATH = getenv('PATH');
        $realpath = realpath($dir);
        if (!$PATH || !$realpath) {
            return false;
        }

        return in_array($realpath, explode(':', $PATH));
    }
private function inPath ( $ dir ) { $ PATH = getenv ( 'PATH' ) ; $ realpath = realpath ( $ dir ) ; if ( ! $ PATH || ! $ realpath ) { return false ; } return in_array ( $ realpath , explode ( ':' , $ PATH ) ) ; }
Check if a directory is in the PATH.

@return bool
Check if a directory is in the PATH .