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