mirror of
https://github.com/php/php-src.git
synced 2024-10-19 15:34:25 +00:00
30 lines
503 B
PHP
30 lines
503 B
PHP
--TEST--
|
|
Test function gzwrite() by calling it invalid lengths
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded("zlib")) {
|
|
print "skip - ZLIB extension not loaded";
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$filename = "temp.txt.gz";
|
|
$h = gzopen($filename, 'w');
|
|
$str = "Here is the string to be written. ";
|
|
var_dump(gzwrite( $h, $str, 0 ) );
|
|
var_dump(gzwrite( $h, $str, -1 ) );
|
|
gzclose($h);
|
|
|
|
$h = gzopen($filename, 'r');
|
|
gzpassthru($h);
|
|
gzclose($h);
|
|
echo "\n";
|
|
unlink($filename);
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
int(0)
|
|
int(0)
|
|
|
|
===DONE===
|