1--TEST--
2image_type_to_mime_type() (passinf equivalent integer values)
3--CREDITS--
4Sanjay Mantoor <sanjay.mantoor@gmail.com>
5--FILE--
6<?php
7echo "*** Testing image_type_to_mime_type() : usage variations ***\n";
8
9for($imagetype = 0; $imagetype <= IMAGETYPE_COUNT; ++$imagetype) {
10  echo "\n-- Iteration $imagetype --\n";
11  var_dump(image_type_to_mime_type($imagetype));
12}
13?>
14--EXPECTREGEX--
15\*\*\* Testing image_type_to_mime_type\(\) : usage variations \*\*\*
16
17-- Iteration 0 --
18string\(24\) "application\/octet-stream"
19
20-- Iteration 1 --
21string\(9\) "image\/gif"
22
23-- Iteration 2 --
24string\(10\) "image\/jpeg"
25
26-- Iteration 3 --
27string\(9\) "image\/png"
28
29-- Iteration 4 --
30string\(29\) "application\/x-shockwave-flash"
31
32-- Iteration 5 --
33string\(9\) "image\/psd"
34
35-- Iteration 6 --
36string\(9\) "image\/bmp"
37
38-- Iteration 7 --
39string\(10\) "image\/tiff"
40
41-- Iteration 8 --
42string\(10\) "image\/tiff"
43
44-- Iteration 9 --
45string\(24\) "application\/octet-stream"
46
47-- Iteration 10 --
48string\(9\) "image\/jp2"
49
50-- Iteration 11 --
51string\(24\) "application\/octet-stream"
52
53-- Iteration 12 --
54string\(24\) "application\/octet-stream"
55
56-- Iteration 13 --
57string\(2[49]\) "application\/(x-shockwave-flash|octet-stream)"
58
59-- Iteration 14 --
60string\(9\) "image\/iff"
61
62-- Iteration 15 --
63string\(18\) "image\/vnd.wap.wbmp"
64
65-- Iteration 16 --
66string\(9\) "image\/xbm"
67
68-- Iteration 17 --
69string\(24\) "image\/vnd.microsoft.icon"
70
71-- Iteration 18 --
72string\(10\) "image\/webp"
73
74-- Iteration 19 --
75string\(10\) "image\/avif"
76
77-- Iteration 20 --
78string\(24\) "application\/octet-stream"
79