mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
b6e3147815
commit
6dc336f073
1 changed files with 20 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue