static function getExtension($filename, $toLower=true) {
        return preg_match('/^.*\.([^\.]*)$/s', $filename, $patt)
            ? ($toLower ? strtolower($patt[1]) : $patt[1]) : "";
    }
static function getExtension($filename, $toLower=true) {
        return preg_match('/^.*\.([^\.]*)$/s', $filename, $patt)
            ? ($toLower ? strtolower($patt[1]) : $patt[1]) : "";
    }
static function getExtension ( $ filename , $ toLower = true ) { return preg_match ( '/^.*\.([^\.]*)$/s' , $ filename , $ patt ) ? ( $ toLower ? strtolower ( $ patt [ 1 ] ) : $ patt [ 1 ] ) : "" ; }
Get the extension from filename
@param string $filename
@param bool $toLower
@return string
Get the extension from filename