1--TEST--
2image_type_to_mime_type()
3--FILE--
4<?php
5
6/* Prototype  : string image_type_to_mime_type  ( int $imagetype  )
7 * Description: Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype.
8 * Source code: ext/standard/image.c
9 * Alias to functions:
10 */
11
12echo "Starting image_type_to_mime_type() test\n\n";
13
14$image_types = array (
15	IMAGETYPE_GIF,
16	IMAGETYPE_JPEG,
17	IMAGETYPE_PNG,
18	IMAGETYPE_SWF,
19	IMAGETYPE_PSD,
20	IMAGETYPE_BMP,
21	IMAGETYPE_TIFF_II,
22	IMAGETYPE_TIFF_MM,
23	IMAGETYPE_JPC,
24	IMAGETYPE_JP2,
25	IMAGETYPE_JPX,
26	IMAGETYPE_JB2,
27	IMAGETYPE_IFF,
28	IMAGETYPE_WBMP,
29	IMAGETYPE_JPEG2000,
30	IMAGETYPE_XBM,
31	IMAGETYPE_WEBP
32);
33
34	foreach($image_types as $image_type) {
35		var_dump(image_type_to_mime_type($image_type));
36	}
37
38echo "\nDone image_type_to_mime_type() test\n";
39?>
40--EXPECT--
41Starting image_type_to_mime_type() test
42
43string(9) "image/gif"
44string(10) "image/jpeg"
45string(9) "image/png"
46string(29) "application/x-shockwave-flash"
47string(9) "image/psd"
48string(9) "image/bmp"
49string(10) "image/tiff"
50string(10) "image/tiff"
51string(24) "application/octet-stream"
52string(9) "image/jp2"
53string(24) "application/octet-stream"
54string(24) "application/octet-stream"
55string(9) "image/iff"
56string(18) "image/vnd.wap.wbmp"
57string(24) "application/octet-stream"
58string(9) "image/xbm"
59string(10) "image/webp"
60
61Done image_type_to_mime_type() test
62