Problem
You want to quickly determine a file's extension.
Solution
Use the File::extension() method.
$extension = File::extension($filename);
If there is no extension, an empty string is returned. Otherwise, a string containing everything after the last period in the filename is returned.
Discussion
No discussion needed.
