1--TEST-- 2Test function readgzfile() reading a gzip relative file 3--SKIPIF-- 4<?php 5if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build'); 6?> 7--FILE-- 8<?php 9$plaintxt = <<<EOT 10hello world 11is a very common test 12for all languages 13 14EOT; 15$dirname = 'readgzfile_temp'; 16$filename = $dirname.'/readgzfile_basic.txt.gz'; 17mkdir($dirname); 18$h = gzopen($filename, 'w'); 19gzwrite($h, $plaintxt); 20gzclose($h); 21 22 23var_dump(readgzfile( $filename ) ); 24 25unlink($filename); 26rmdir($dirname); 27?> 28===DONE=== 29--EXPECT-- 30hello world 31is a very common test 32for all languages 33int(52) 34===DONE=== 35