You can use exif_imagetype($tmp_name) to check the actual type of the file based on its header. This checks the type based on the contents of the file, so it is the most reliable (e.g. it will give you the right information even if somebody gives you a JPG with a ".png" extension).
There is also the type
property ($_FILES['myfile']['type']
), which will give you the MIME type that the browser claims the file is. However, this cannot be trusted if someone maliciously forges the request.