What version of PHP is required to use the mime_content_type function for determining file types?

The mime_content_type function was deprecated in PHP 5.3.0 and removed in PHP 7.2.0. If you want to use this function to determine file types, you will need to use PHP 5.2.0 to PHP 5.2.17.

// Check if the mime_content_type function exists before using it
if (function_exists('mime_content_type')) {
    $file = 'example.txt';
    $fileType = mime_content_type($file);
    echo "The file type of $file is: $fileType";
} else {
    echo "mime_content_type function is not available in this version of PHP.";
}