show pathinfo alternative for splfileinfo::getextension (thanks Jonathan Maron)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@313234 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Peter Cowburn 2011-07-14 11:07:17 +00:00
parent b6e3147815
commit 6dc336f073

View file

@ -63,6 +63,26 @@ string(2) "gz"
</example>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<para>
This method is only available as of PHP 5.3.6.
Another way of getting the extension is to use the
<function>pathinfo</function> function.
</para>
<example>
<programlisting role="php">
<![CDATA[
<?php
$extension = pathinfo($info->getFilename(), PATHINFO_EXTENSION);
?>
]]>
</programlisting>
</example>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>