blob: 7ed77b36b3381ff902b802c347c4302406925883 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--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);
?>
--EXPECT--
Here is some plain
text to be read
and displayed.
|