1--TEST--
2Test gzopen() function : variation: relative/absolute 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$absfile = __FILE__.'.tmp';
19$relfile = "gzopen_variation6.tmp";
20
21$h = gzopen($absfile, "w");
22gzwrite($h, "This is an absolute file");
23gzclose($h);
24
25$h = gzopen($relfile, "w");
26gzwrite($h, "This is a relative file");
27gzclose($h);
28
29$h = gzopen($absfile, "r");
30gzpassthru($h);
31fclose($h);
32echo "\n";
33
34$h = gzopen($relfile, "r");
35gzpassthru($h);
36gzclose($h);
37echo "\n";
38
39unlink($absfile);
40unlink($relfile);
41?>
42===DONE===
43--EXPECTF--
44*** Testing gzopen() : variation ***
45This is an absolute file
46This is a relative file
47===DONE===
48