svn: /phpdoc/en/trunk/reference/filesystem/functions/ pathinfo.xml
| From: | Christoph Michael Becker | Date: | Wed, 22 Jun 2016 14:17:23 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/filesystem/functions/ pathinfo.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-14232@lists.php.net to get a copy of this message | ||
cmb Wed, 22 Jun 2016 14:17:23 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=339450
Log:
Fix #67048: pathinfo() doesn't document parsing of dot-files
Bug: https://bugs.php.net/67048 (Verified) pathinfo()
doesn't document parsing of dot-files
Changed paths:
U phpdoc/en/trunk/reference/filesystem/functions/pathinfo.xml
Modified: phpdoc/en/trunk/reference/filesystem/functions/pathinfo.xml
===================================================================
--- phpdoc/en/trunk/reference/filesystem/functions/pathinfo.xml 2016-06-22 12:00:51 UTC (rev 339449)
+++ phpdoc/en/trunk/reference/filesystem/functions/pathinfo.xml 2016-06-22 14:17:23 UTC (rev 339450)
@@ -75,6 +75,14 @@
(see second example below).
</para>
</note>
+ <note>
+ <para>
+ If the <literal>basename</literal> of the <parameter>path</parameter>
starts
+ with a dot, the following characters are interpreted as
+ <literal>extension</literal>, and the <literal>filename</literal> is
empty
+ (see third example below).
+ </para>
+ </note>
<para>
If <parameter>options</parameter> is present, returns a
<type>string</type> containing the requested element.
@@ -158,6 +166,30 @@
</screen>
</example>
</para>
+ <para>
+ <example>
+ <title><function>pathinfo</function> example for a dot-file</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+print_r(pathinfo('/some/path/.test'));
+?>
+]]>
+ </programlisting>
+ &example.outputs.similar;
+ <screen>
+<![CDATA[
+Array
+(
+ [dirname] => /some/path
+ [basename] => .test
+ [extension] => test
+ [filename] =>
+)
+]]>
+ </screen>
+ </example>
+ </para>
</refsect1>
<refsect1 role="notes">