|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #80476 Asking for new feature : SplFileInfo->getMIMEType()
Submitted: 2020-12-03 07:02 UTC Modified: -
From: rdefaux at gmail dot com Assigned:
Status: Open Package: Filesystem function related
PHP Version: 7.4.13 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-12-03 07:02 UTC] rdefaux at gmail dot com

It would be nice if the class SplFileInfo had the method
getMIMEType() : string|false
This method would return a string representing the MIME type (same result as mime_content_type ( resource|string $filename ) function), or false if the file doesn't exists or is not a file (I mean is a dir, a symlink, etc...)

PS : it is the first time I ask for a request, I hope I'm doing it in a proper way.
And thanks a lot too to all the PHP team for its wonderful work ! :)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-12-03 10:28 UTC] rtrtrtrtrt at dfdfdfdf dot dfd
not possible, that's the "fileinfo" extensions job and the large mimemagic database mustn't be mandatory for spl-functions

-rwxr-xr-x 1 root root 5,5M 2020-11-26 08:36 /usr/lib64/php/modules/
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 18 13:03:38 2021 UTC