1--TEST--
2Test compress.zlib:// scheme with the copy function: compressed to uncompressed
3--EXTENSIONS--
4zlib
5--FILE--
6<?php
7$inputFileName = __DIR__."/004.txt.gz";
8$outputFileName = __FILE__.'.tmp';
9
10$srcFile = "compress.zlib://$inputFileName";
11$destFile = $outputFileName;
12copy($srcFile, $destFile);
13
14$h = gzopen($inputFileName, 'r');
15$org_data = gzread($h, 4096);
16gzclose($h);
17
18// can only read uncompressed data
19$h = fopen($outputFileName, 'r');
20$copied_data = fread($h, 4096);
21gzclose($h);
22
23if ($org_data == $copied_data) {
24   echo "OK: Copy identical\n";
25}
26else {
27   echo "FAILED: Copy not identical";
28}
29unlink($outputFileName);
30?>
31--EXPECT--
32OK: Copy identical
33