|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-27 16:05 UTC] kalle@php.net
[2020-02-07 06:10 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 15:00:01 2026 UTC |
Description: ------------ If is_dir() wants to return true for symbolic links to directories that's fine, but this should be mentioned in the documentation. Cheers! --matt Reproduce code: --------------- <?php symlink('/etc/', '/tmp/imalink'); if (is_dir('/tmp/imalink')) { print "Hmm. I think /tmp/imalink is a directory! The usually excellent documentation at php.net didn't help me expect this result. :("; } else { print "I think /tmp/imalink is not a directory, which is what I would expect to be the case since I know it's a symlink."; } ?> Expected result: ---------------- I think /tmp/imalink is not a directory, which is what I would expect to be the case since I know it's a symlink. Actual result: -------------- Hmm. I think /tmp/imalink is a directory! The usually excellent documentation at php.net didn't help me expect this result. :(