1--TEST--
2stream_get_meta_data() on directories
3--FILE--
4<?php
5
6$dir = opendir(dirname(__FILE__));
7var_dump(stream_get_meta_data($dir));
8closedir($dir);
9
10$dirObject = dir(dirname(__FILE__));
11var_dump(stream_get_meta_data($dirObject->handle));
12
13?>
14--EXPECT--
15array(8) {
16  ["wrapper_type"]=>
17  string(9) "plainfile"
18  ["stream_type"]=>
19  string(3) "dir"
20  ["mode"]=>
21  string(1) "r"
22  ["unread_bytes"]=>
23  int(0)
24  ["seekable"]=>
25  bool(true)
26  ["timed_out"]=>
27  bool(false)
28  ["blocked"]=>
29  bool(true)
30  ["eof"]=>
31  bool(false)
32}
33array(8) {
34  ["wrapper_type"]=>
35  string(9) "plainfile"
36  ["stream_type"]=>
37  string(3) "dir"
38  ["mode"]=>
39  string(1) "r"
40  ["unread_bytes"]=>
41  int(0)
42  ["seekable"]=>
43  bool(true)
44  ["timed_out"]=>
45  bool(false)
46  ["blocked"]=>
47  bool(true)
48  ["eof"]=>
49  bool(false)
50}
51