File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
zlib /
tests /
gzwrite_variation1.phpt
Revision
1.1.1.2 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue May 29 12:34:38 2012 UTC (12 years, 9 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--
Test function gzwrite() by calling it when file is opened for reading
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
print "skip - ZLIB extension not loaded";
}
?>
--FILE--
<?php
$filename = dirname(__FILE__)."/004.txt.gz";
$h = gzopen($filename, 'r');
$str = b"Here is the string to be written. ";
$length = 10;
var_dump(gzwrite( $h, $str ) );
var_dump(gzread($h, 10));
var_dump(gzwrite( $h, $str, $length ) );
gzclose($h);
?>
===DONE===
--EXPECT--
int(0)
string(10) "When you'r"
int(0)
===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>