1--TEST-- 2Test gzopen() function : variation: opening a plain file 3--SKIPIF-- 4<?php 5if (!extension_loaded("zlib")) { 6 print "skip - ZLIB extension not loaded"; 7} 8?> 9--FILE-- 10<?php 11/* Prototype : resource gzopen(string filename, string mode [, int use_include_path]) 12 * Description: Open a .gz-file and return a .gz-file pointer 13 * Source code: ext/zlib/zlib.c 14 * Alias to functions: 15 */ 16 17echo "*** Testing gzopen() : variation ***\n"; 18 19$data = <<<EOT 20Here is some plain 21text to be read 22and displayed. 23EOT; 24 25$file = "gzopen_variation8.tmp"; 26$h = fopen($file, 'w'); 27fwrite($h, $data); 28fclose($h); 29 30$h = gzopen($file, 'r'); 31gzpassthru($h); 32gzclose($h); 33echo "\n"; 34unlink($file); 35?> 36===DONE=== 37--EXPECT-- 38*** Testing gzopen() : variation *** 39Here is some plain 40text to be read 41and displayed. 42===DONE=== 43