blob: 6202b38e896549b4c55810c57c50bccd44be879d (
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
|
--TEST--
Compare getimagesize and getimagesizefromstring
--FILE--
<?PHP
$img = __DIR__ . '/test.gif';
$i1 = getimagesize($img);
$data = file_get_contents($img);
$i2 = getimagesizefromstring($data);
var_dump($i1);
var_dump($i2);
?>
--EXPECT--
array(7) {
[0]=>
int(120)
[1]=>
int(67)
[2]=>
int(1)
[3]=>
string(23) "width="120" height="67""
["bits"]=>
int(7)
["channels"]=>
int(3)
["mime"]=>
string(9) "image/gif"
}
array(7) {
[0]=>
int(120)
[1]=>
int(67)
[2]=>
int(1)
[3]=>
string(23) "width="120" height="67""
["bits"]=>
int(7)
["channels"]=>
int(3)
["mime"]=>
string(9) "image/gif"
}
|