1--TEST-- 2fstat() tests 3--FILE-- 4<?php 5 6$filename = __DIR__."/fstat.dat"; 7 8$fp = fopen($filename, "w"); 9var_dump(fstat($fp)); 10fclose($fp); 11try { 12 var_dump(fstat($fp)); 13} catch (TypeError $e) { 14 echo $e->getMessage(), "\n"; 15} 16 17@unlink($filename); 18echo "Done\n"; 19?> 20--EXPECTF-- 21array(26) { 22 [0]=> 23 int(%i) 24 [1]=> 25 int(%i) 26 [2]=> 27 int(%i) 28 [3]=> 29 int(%i) 30 [4]=> 31 int(%i) 32 [5]=> 33 int(%i) 34 [6]=> 35 int(%i) 36 [7]=> 37 int(%i) 38 [8]=> 39 int(%i) 40 [9]=> 41 int(%i) 42 [10]=> 43 int(%i) 44 [11]=> 45 int(%i) 46 [12]=> 47 int(%i) 48 ["dev"]=> 49 int(%i) 50 ["ino"]=> 51 int(%i) 52 ["mode"]=> 53 int(%i) 54 ["nlink"]=> 55 int(%i) 56 ["uid"]=> 57 int(%i) 58 ["gid"]=> 59 int(%i) 60 ["rdev"]=> 61 int(%i) 62 ["size"]=> 63 int(%i) 64 ["atime"]=> 65 int(%i) 66 ["mtime"]=> 67 int(%i) 68 ["ctime"]=> 69 int(%i) 70 ["blksize"]=> 71 int(%i) 72 ["blocks"]=> 73 int(%i) 74} 75fstat(): supplied resource is not a valid stream resource 76Done 77