public static function hasExtension($baseName, array $extensions)
    {
        // Lowercase names
        $baseName = strtolower($baseName);

        $extensions = array_map(function($key){
            return strtolower($key);
        }, $extensions);

        return in_array(self::getExtension($baseName), $extensions);
    }
public static function hasExtension($baseName, array $extensions)
    {
        // Lowercase names
        $baseName = strtolower($baseName);

        $extensions = array_map(function($key){
            return strtolower($key);
        }, $extensions);

        return in_array(self::getExtension($baseName), $extensions);
    }
public static function hasExtension ( $ baseName , array $ extensions ) { // Lowercase names $ baseName = strtolower ( $ baseName ) ; $ extensions = array_map ( function ( $ key ) { return strtolower ( $ key ) ; } , $ extensions ) ; return in_array ( self :: getExtension ( $ baseName ) , $ extensions ) ; }
Checks whether file has extension

@param string $baseName
@param array $extensions
@return boolean
Checks whether file has extension