mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
25 lines
412 B
PHP
25 lines
412 B
PHP
--TEST--
|
|
Test function gzwrite() by calling it invalid lengths
|
|
--EXTENSIONS--
|
|
zlib
|
|
--FILE--
|
|
<?php
|
|
|
|
$filename = "gzwrite_error2.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);
|
|
?>
|
|
--EXPECT--
|
|
int(0)
|
|
int(0)
|
|
|