From 39ed737c2ff0ff9c51db6dc2ff6eef8f3033d5c0 Mon Sep 17 00:00:00 2001 From: Torben Wilson Date: Sun, 10 Feb 2002 00:59:02 +0000 Subject: [PATCH] Closes bug #14538: noted change in dirname() behaviour. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@69880 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/filesystem.xml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/functions/filesystem.xml b/functions/filesystem.xml index 33ffdd85b3..18faf5c316 100644 --- a/functions/filesystem.xml +++ b/functions/filesystem.xml @@ -1,5 +1,5 @@ - + Filesystem functions Filesystem @@ -293,6 +293,20 @@ $file = dirname ($path); // $file is set to "/etc" + + + In PHP 4.0.3, dirname was fixed to be + POSIX-compliant. Essentially, this means that if there are no + slashes in path , a dot + ('.') is returned, indicating the current + directory. Otherwise, the returned string is + path with any trailing + /component removed. Note that this means that + you will often get a slash or a dot back from + dirname in situations where the older + functionality would have given you the empty string. + + See also: basename