title: Get the file extension (basename?)
body: <p>If I have a code like this:</p>
  
  <pre><code>$file = basename($filename); 
  </code></pre>
  
  <p>How do I get the file extension of <code>$file</code>? The variable <code>$file</code> could contain any kind of file, like <code>index.php</code> or <code>test.jpeg</code>.</p>