1$fileName = 'banner.jpg';
2
3$ext = end(explode('.', $fileName));
4$ext = substr(strrchr($fileName, '.'), 1);
5$ext = substr($fileName, strrpos($fileName, '.') + 1);
6$ext = preg_replace('/^.*\.([^.]+)$/D', '$1', $fileName);
7$ext = pathinfo($fileName, PATHINFO_EXTENSION);
8