1--TEST-- 2Test compress.zlib:// scheme with the copy function: compressed to compressed 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 = "compress.zlib://$outputFileName"; 12copy($srcFile, $destFile); 13 14$h = gzopen($inputFileName, 'r'); 15$org_data = gzread($h, 4096); 16gzclose($h); 17 18$h = gzopen($outputFileName, 'r'); 19$copied_data = gzread($h, 4096); 20gzclose($h); 21 22if ($org_data == $copied_data) { 23 echo "OK: Copy identical\n"; 24} 25else { 26 echo "FAILED: Copy not identical"; 27} 28unlink($outputFileName); 29?> 30--EXPECT-- 31OK: Copy identical 32