public static function ext($fileName)
    {
        if (strpos($fileName, '.') === false) {
            return '';
        }

        return strtolower(
            substr(
                $fileName,
                strrpos($fileName, '.') + 1,
                strlen($fileName)
            )
        );
    }
public static function ext($fileName)
    {
        if (strpos($fileName, '.') === false) {
            return '';
        }

        return strtolower(
            substr(
                $fileName,
                strrpos($fileName, '.') + 1,
                strlen($fileName)
            )
        );
    }
public static function ext ( $ fileName ) { if ( strpos ( $ fileName , '.' ) === false ) { return '' ; } return strtolower ( substr ( $ fileName , strrpos ( $ fileName , '.' ) + 1 , strlen ( $ fileName ) ) ) ; }
Get file extension.

@param string $fileName File name, including its extension. e.g.: `my-file.docx`
@return string File extension without the ending DOT and lowercased,
e.g. `pdf`, `jpg`, `png`, etc. If no extension is found an empty string will
be returned
Get file extension .