How can the MIME type of a variable's content be determined in PHP?
To determine the MIME type of a variable's content in PHP, you can use the `finfo` extension which provides functions to determine the MIME type of a file. You can create a `finfo` object and use the `file` method to get the MIME type of the variable's content.
// Create a finfo object
$finfo = new finfo(FILEINFO_MIME_TYPE);
// Get the MIME type of the variable's content
$mime_type = $finfo->file($variable);