File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
zlib /
tests /
gzseek_variation1.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:05 2012 UTC (12 years, 8 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,
v5_3_10,
HEAD
php
--TEST--
Test function gzseek() by seeking forward in write mode
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
print "skip - ZLIB extension not loaded";
}
?>
--FILE--
<?php
$f = "temp3.txt.gz";
$h = gzopen($f, 'w');
$str1 = "This is the first line.";
$str2 = "This is the second line.";
gzwrite($h, $str1);
//seek forwards 20 bytes.
gzseek($h, strlen($str1) + 20);
gzwrite($h, $str2);
gzclose($h);
$h = gzopen($f, 'r');
echo gzread($h, strlen($str1))."\n";
echo var_dump(bin2hex(gzread($h, 20)));
echo gzread($h, strlen($str2))."\n";
gzclose($h);
unlink($f);
?>
===DONE===
--EXPECT--
This is the first line.
string(40) "0000000000000000000000000000000000000000"
This is the second line.
===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>