function getExtension(string $file): string { return pathinfo($file, PATHINFO_EXTENSION); }
Programming Tips - Old - PHP: get a file's extension in php
Date: 2017jun16
Language: php
Keywords: suffix
Q. PHP: get a file's extension in php
A. Use pathinfo() like this.