1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 18:22:42 +01:00

- #51063, news and test

This commit is contained in:
Pierre Joye
2010-05-05 13:39:35 +00:00
parent b9730786a7
commit bd2f9d56ec
2 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
--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"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB