summaryrefslogtreecommitdiff
path: root/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt
blob: bdcc077b67434df9a6fc5897eccaf52534a24bdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--TEST--
stream_get_meta_data() on directories
--FILE--
<?php

$dir = opendir(__DIR__);
var_dump(stream_get_meta_data($dir));
closedir($dir);

$dirObject = dir(__DIR__);
var_dump(stream_get_meta_data($dirObject->handle));

?>
--EXPECT--
array(8) {
  ["timed_out"]=>
  bool(false)
  ["blocked"]=>
  bool(true)
  ["eof"]=>
  bool(false)
  ["wrapper_type"]=>
  string(9) "plainfile"
  ["stream_type"]=>
  string(3) "dir"
  ["mode"]=>
  string(1) "r"
  ["unread_bytes"]=>
  int(0)
  ["seekable"]=>
  bool(true)
}
array(8) {
  ["timed_out"]=>
  bool(false)
  ["blocked"]=>
  bool(true)
  ["eof"]=>
  bool(false)
  ["wrapper_type"]=>
  string(9) "plainfile"
  ["stream_type"]=>
  string(3) "dir"
  ["mode"]=>
  string(1) "r"
  ["unread_bytes"]=>
  int(0)
  ["seekable"]=>
  bool(true)
}