[php-src] Issue #12918: Allow to resolve known mime type to file extension
| From: | mvorisek | Date: | Sat, 09 Dec 2023 22:40:18 +0000 |
| Subject: | [php-src] Issue #12918: Allow to resolve known mime type to file extension | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246023@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/12918
Author: mvorisek
### Description
Mime type to file extension is already supported by
FILEINFO_EXTENSION but it is
impossible to specify the mime type :).
I expect code like:
```
$mimetype = 'application/zip';
$finfo = finfo_open(FILEINFO_EXTENSION);
var_dump(finfo_buffer($finfo, $mimetype, FILEINFO_EXTENSION));
```
to dump zip.