public function change(string $file, string $ext): string
    {
        if (!$file || !$ext) {
            return $file; // Not possible.
        }
        return $file = preg_replace('/\.[^.]+$/ui', '.'.$ext, $file);
    }
public function change(string $file, string $ext): string
    {
        if (!$file || !$ext) {
            return $file; // Not possible.
        }
        return $file = preg_replace('/\.[^.]+$/ui', '.'.$ext, $file);
    }
public function change ( string $ file , string $ ext ) : string { if ( ! $ file || ! $ ext ) { return $ file ; // Not possible. } return $ file = preg_replace ( '/\.[^.]+$/ui' , '.' . $ ext , $ file ) ; }
Change file extension.

@since 17xxxx Extension utils.

@param string $file Image file.
@param string $ext  New extension.

@return string File w/ possible extension.
Change file extension .