xref: /php-src/ext/standard/tests/file/filestat.phpt (revision dd1d1191)
1--TEST--
2various file stat func tests
3--FILE--
4<?php
5
6var_dump(fileinode("."));
7var_dump(fileowner("."));
8var_dump(filegroup("."));
9var_dump(fileatime("."));
10var_dump(filectime("."));
11
12var_dump(fileinode("./.."));
13var_dump(fileowner("./.."));
14var_dump(filegroup("./.."));
15var_dump(fileatime("./.."));
16var_dump(filectime("./.."));
17
18var_dump(fileinode(__FILE__));
19var_dump(fileowner(__FILE__));
20var_dump(filegroup(__FILE__));
21var_dump(fileatime(__FILE__));
22var_dump(filectime(__FILE__));
23
24var_dump(fileinode("/no/such/file/or/dir"));
25var_dump(fileowner("/no/such/file/or/dir"));
26var_dump(filegroup("/no/such/file/or/dir"));
27var_dump(fileatime("/no/such/file/or/dir"));
28var_dump(filectime("/no/such/file/or/dir"));
29
30echo "Done\n";
31?>
32--EXPECTF--
33int(%i)
34int(%d)
35int(%d)
36int(%d)
37int(%d)
38int(%i)
39int(%d)
40int(%d)
41int(%d)
42int(%d)
43int(%i)
44int(%d)
45int(%d)
46int(%d)
47int(%d)
48
49Warning: fileinode(): stat failed for /no/such/file/or/dir in %s on line %d
50bool(false)
51
52Warning: fileowner(): stat failed for /no/such/file/or/dir in %s on line %d
53bool(false)
54
55Warning: filegroup(): stat failed for /no/such/file/or/dir in %s on line %d
56bool(false)
57
58Warning: fileatime(): stat failed for /no/such/file/or/dir in %s on line %d
59bool(false)
60
61Warning: filectime(): stat failed for /no/such/file/or/dir in %s on line %d
62bool(false)
63Done
64