exif_imagetype

Supported Versions: PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
Determine the type of an image
<?php exif_imagetype(string $filename): int|false