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