File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
image /
getimagesizefromstring1.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue May 29 12:34:44 2012 UTC (12 years, 2 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
HEAD
php 5.4.3+patches
--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"
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>