79527854

Date: 2025-03-22 17:49:14
Score: 1
Natty:
Report link

Function to guess the MIME-type of the string data (from php-gears lib):

public static function guessMime(string $string): ?string
{
    return (new finfo(FILEINFO_MIME_TYPE))->buffer($string) ?? null;
}

Eventually, the MIME-type of base64 encoded string:

guessMime(base64_decode($data));

or PPT/DOCX file:

mime_content_type("/foo/bar.docx");
Reasons:
  • Contains signature (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Cosmologist