1--TEST-- 2gzfile(), gzreadfile() 3--EXTENSIONS-- 4zlib 5--FILE-- 6<?php 7$original = <<<EOD 8blah blah blah blah blah blah blah 9blah blah blah blah blah blah blah 10blah blah blah blah blah blah blah 11blah blah blah blah blah blah blah 12blah blah blah blah blah blah blah 13blah blah blah blah blah blah blah 14blah blah blah blah blah blah blah 15blah blah blah blah blah blah blah 16blah blah blah blah blah blah blah 17blah blah blah blah blah blah blah 18blah blah blah blah blah blah blah 19blah blah blah blah blah blah blah 20blah blah blah blah blah blah blah 21blah blah blah blah blah blah blah 22blah blah blah blah blah blah blah 23blah blah blah blah blah blah blah 24 25EOD; 26 27$filename = tempnam(sys_get_temp_dir(), "phpt"); 28 29$fp = gzopen($filename, "wb"); 30gzwrite($fp, $original); 31var_dump(strlen($original)); 32fclose($fp); 33 34readgzfile($filename); 35 36echo "\n"; 37 38$lines = gzfile($filename); 39 40unlink($filename); 41 42foreach ($lines as $line) { 43 echo $line; 44} 45 46?> 47--EXPECT-- 48int(560) 49blah blah blah blah blah blah blah 50blah blah blah blah blah blah blah 51blah blah blah blah blah blah blah 52blah blah blah blah blah blah blah 53blah blah blah blah blah blah blah 54blah blah blah blah blah blah blah 55blah blah blah blah blah blah blah 56blah blah blah blah blah blah blah 57blah blah blah blah blah blah blah 58blah blah blah blah blah blah blah 59blah blah blah blah blah blah blah 60blah blah blah blah blah blah blah 61blah blah blah blah blah blah blah 62blah blah blah blah blah blah blah 63blah blah blah blah blah blah blah 64blah blah blah blah blah blah blah 65 66blah blah blah blah blah blah blah 67blah blah blah blah blah blah blah 68blah blah blah blah blah blah blah 69blah blah blah blah blah blah blah 70blah blah blah blah blah blah blah 71blah blah blah blah blah blah blah 72blah blah blah blah blah blah blah 73blah blah blah blah blah blah blah 74blah blah blah blah blah blah blah 75blah blah blah blah blah blah blah 76blah blah blah blah blah blah blah 77blah blah blah blah blah blah blah 78blah blah blah blah blah blah blah 79blah blah blah blah blah blah blah 80blah blah blah blah blah blah blah 81blah blah blah blah blah blah blah 82