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
This commit is contained in:
Torben Wilson 2002-02-10 00:59:02 +00:00
parent 449fd13992
commit 39ed737c2f

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.120 $ -->
<!-- $Revision: 1.121 $ -->
<reference id="ref.filesystem">
<title>Filesystem functions</title>
<titleabbrev>Filesystem</titleabbrev>
@ -293,6 +293,20 @@ $file = dirname ($path); // $file is set to "/etc"
</programlisting>
</example>
</para>
<note>
<para>
In PHP 4.0.3, <function>dirname</function> was fixed to be
POSIX-compliant. Essentially, this means that if there are no
slashes in <parameter>path</parameter> , a dot
('<literal>.</literal>') is returned, indicating the current
directory. Otherwise, the returned string is
<parameter>path</parameter> with any trailing
<literal>/component</literal> removed. Note that this means that
you will often get a slash or a dot back from
<function>dirname</function> in situations where the older
functionality would have given you the empty string.
</para>
</note>
<para>
See also: <function>basename</function>
</para>