title: SPLFileInfo: get filename without extension
body: <p>I'm accessing a number of files in the SPLFileInfo object. I see a way to get the path, filename, and even extension of the file. Is there a way to get the filename without extension? Here's the code I've been working with but I'm hoping to get something more elegant. Is there an out of the box solution?</p>
  
  <pre><code>$file = new SplFileInfo("path/to/file.txt.zip"); 
  
  echo 'basename: '.$file-&gt;getBasename();  
  echo PHP_EOL;
  echo 'filename: '.$file-&gt;getFilename();
  echo PHP_EOL;    
  echo 'extension: '.$file-&gt;getExtension();
  echo PHP_EOL;    
  echo 'basename w/o extension: '.$file-&gt;getBasename('.'.$file-&gt;getExtension());
  
  &gt;&gt;OUTPUT
  &gt;&gt;basename: file.txt.zip
  &gt;&gt;filename: file.txt.zip
  &gt;&gt;extension: zip
  &gt;&gt;basename w/o extension: file.txt
  </code></pre>