summaryrefslogtreecommitdiff
path: root/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt
blob: 51a52c9808efc8683c77be686ffe78301c101671 (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.