mirror of
https://github.com/php/php-src.git
synced 2024-10-19 15:34:25 +00:00
31 lines
554 B
PHP
31 lines
554 B
PHP
--TEST--
|
|
Test compress.zlib:// scheme with the file_get_contents
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded("zlib")) {
|
|
print "skip - ZLIB extension not loaded";
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$outputFileName = __FILE__.'tmp';
|
|
$outFile = "compress.zlib://$outputFileName";
|
|
$data = <<<EOT
|
|
Here is some plain
|
|
text to be read
|
|
and displayed.
|
|
EOT;
|
|
|
|
file_put_contents($outFile, $data);
|
|
$h = gzopen($outputFileName, 'r');
|
|
gzpassthru($h);
|
|
gzclose($h);
|
|
echo "\n";
|
|
unlink($outputFileName);
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
Here is some plain
|
|
text to be read
|
|
and displayed.
|
|
===DONE===
|