1--TEST--
2Test function stream_get_meta_data on a zlib stream
3--SKIPIF--
4<?php
5if (!extension_loaded("zlib")) {
6	print "skip - ZLIB extension not loaded";
7}
8?>
9--FILE--
10<?php
11echo "no wrapper\n";
12$f = dirname(__FILE__)."/004.txt.gz";
13$h = gzopen($f,'r');
14var_dump(stream_get_meta_data($h));
15gzclose($h);
16echo "\nwith wrapper\n";
17$f = "compress.zlib://".dirname(__FILE__)."/004.txt.gz";
18$h = fopen($f,'r');
19var_dump(stream_get_meta_data($h));
20gzclose($h);
21
22
23?>
24===DONE===
25--EXPECTF--
26no wrapper
27array(7) {
28  ["timed_out"]=>
29  bool(false)
30  ["blocked"]=>
31  bool(true)
32  ["eof"]=>
33  bool(false)
34  ["stream_type"]=>
35  string(4) "ZLIB"
36  ["mode"]=>
37  string(1) "r"
38  ["unread_bytes"]=>
39  int(0)
40  ["seekable"]=>
41  bool(true)
42}
43
44with wrapper
45array(9) {
46  ["timed_out"]=>
47  bool(false)
48  ["blocked"]=>
49  bool(true)
50  ["eof"]=>
51  bool(false)
52  ["wrapper_type"]=>
53  string(4) "ZLIB"
54  ["stream_type"]=>
55  string(4) "ZLIB"
56  ["mode"]=>
57  string(1) "r"
58  ["unread_bytes"]=>
59  int(0)
60  ["seekable"]=>
61  bool(true)
62  ["uri"]=>
63  string(%d) "compress.zlib://%s/004.txt.gz"
64}
65===DONE===