Note that this functions follows symbolic links. It will return true if the file is actually a symlink that points to a directory.
An example:
<php
symlink(".", "testlink");
var_dump(is_dir("testlink"));
unlink("testlink");
?>
Prints out:
bool(true)
(Windows Note: Under recent versions of Windows you can set symlinks as long as you're administrator, but you cannot remove directory symlinks with "unlink()", you will have to use "rmdir testlink" from the shell to get rid of it.)