Yöntem 1
function findexts ($filename) ( $filename = strtolower($filename) ; $exts = split("(/\\.)", $filename) ; $n = count($exts)-1; $exts = $exts($n); return $exts; )
Yöntem 2
$filename = 'mypic.gif'; $ext = pathinfo($filename, PATHINFO_EXTENSION);
Yöntem 3
function getFileextension($file) ( return end(explode(".", $file)); )