mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
27 lines
517 B
PHP
27 lines
517 B
PHP
--TEST--
|
|
Test function fflush() on a zlib stream wrapper
|
|
--EXTENSIONS--
|
|
zlib
|
|
--FILE--
|
|
<?php
|
|
|
|
$filename = "zlib_wrapper_fflush_basic.txt.gz";
|
|
$h = gzopen($filename, 'w');
|
|
$str = "Here is the string to be written.";
|
|
$length = 10;
|
|
var_dump(fflush($h));
|
|
gzwrite( $h, $str);
|
|
gzwrite( $h, $str);
|
|
var_dump(fflush($h));
|
|
gzclose($h);
|
|
|
|
$h = gzopen($filename, 'r');
|
|
gzpassthru($h);
|
|
gzclose($h);
|
|
echo "\n";
|
|
unlink($filename);
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|
|
Here is the string to be written.Here is the string to be written.
|