note 38669 deleted from function.is-dir by nlopess

From: Date: Fri, 02 Jan 2004 12:05:38 +0000
Subject: note 38669 deleted from function.is-dir by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62779@lists.php.net to get a copy of this message
Note Submitter: Rich ---- 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.)

« previous php.notes (#62779) next »