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:
49
ext/standard/tests/image/getimagesizefromstring1.phpt
Normal file
49
ext/standard/tests/image/getimagesizefromstring1.phpt
Normal 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"
|
||||
}
|
||||
|
||||
BIN
ext/standard/tests/image/test.gif
Normal file
BIN
ext/standard/tests/image/test.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
Reference in New Issue
Block a user