note 38669 added to function.is-dir

From: Date: Fri, 02 Jan 2004 08:50:17 +0000
Subject: note 38669 added to function.is-dir
Groups: php.notes 
Request: Send a blank email to php-notes+get-62770@lists.php.net to get a copy of this message
Contrary to what is implied by the description, this function can NOT be used to check the existence of a directory! The description only says "Returns TRUE if the filename exists and is a directory." First, this is very poor documentation. It doesn't say anything about what happens if the filename does not exist and/or is not a directory. It is implied that this function returns FALSE in other situations, which would make sense, but unfortunately that is NOT the case! If nothing exists with that name, the function throws a warning, which in the default PHP configuration, the user will see. I consider it a bug in PHP, but apparently the developers disagree, since they have classified this issue as "bogus" on the bug-reporting site. Regardless, this issue should be documented here. (So here it is.) ---- Manual Page -- http://www.php.net/manual/en/function.is-dir.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38669 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38669&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38669&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#62770) next »