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