Why is mime_content_type() deprecated in PHP?

Josiah picture Josiah · Aug 12, 2009 · Viewed 37.8k times · Source

I'm just curious to know why mime_content_type() is now considered deprecated.

This method for determining the mime type is much easier than the replacement Fileinfo functionality.

Answer

Adam picture Adam · Sep 24, 2016

The method is not deprecated!

It once was incorrectly marked as deprecated in the manual, but it has been fixed https://bugs.php.net/bug.php?id=71367 on the 14th of January 2016. However, at the moment, it is still incorrectly marked deprecated in the German, Spanish and Chinese manual.

Feel free to use mime_content_type() whenever you like :).