documentation for basename()s optional 2nd argument 'suffix'

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@50019 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hartmut Holzgraefe 2001-06-23 00:56:33 +00:00
parent fb4fc68696
commit 086eb06440

View file

@ -15,11 +15,14 @@
<funcprototype>
<funcdef>string <function>basename</function></funcdef>
<paramdef>string <parameter>path</parameter></paramdef>
<paramdef>string <parameter><optional>suffix</optional></parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Given a string containing a path to a file, this function will
return the base name of the file.
If the filename ends in <parameter>suffix</parameter> this will
also be cut of.
</para>
<para>
On Windows, both slash (<literal>/</literal>) and backslash
@ -33,6 +36,7 @@
<programlisting role="php">
$path = "/home/httpd/html/index.php3";
$file = basename ($path); // $file is set to "index.php3"
$file = basename ($path,".php3"); // $file is set to "index"
</programlisting>
</example>
</para>