public static function getFileExtention($path)
    {

        $ext = pathinfo($path, PATHINFO_EXTENSION);

        if($ext === ''){
            $splitedPath = explode('.', $path);
            $ext = end($splitedPath);
        }

        return $ext;
    }
public static function getFileExtention($path)
    {

        $ext = pathinfo($path, PATHINFO_EXTENSION);

        if($ext === ''){
            $splitedPath = explode('.', $path);
            $ext = end($splitedPath);
        }

        return $ext;
    }
public static function getFileExtention ( $ path ) { $ ext = pathinfo ( $ path , PATHINFO_EXTENSION ) ; if ( $ ext === '' ) { $ splitedPath = explode ( '.' , $ path ) ; $ ext = end ( $ splitedPath ) ; } return $ ext ; }
Retrieve file extensions of a file

@param  string $path the path of the file we want to get the extension
@return string The extension of the parameter file
Retrieve file extensions of a file