finfo_*
and pathinfo
are used to detect the mimetype of the file and not the extension.
The issue is that in the world there are several file formats and from time to time new formats appear, I can not do a test to know which function has the best support for mimetypes detection, ie it is an unfeasible test to do due to the amount of file formats, what I have doubts is about which of these functions has better support.
Question:
-
Which of these functions has the best support for detecting mime-types of files?
-
Which is better maintained by PHP?