summaryrefslogtreecommitdiff
path: root/ext/standard/tests/file/filestat.phpt
blob: f6031219c72ef308a04d5011f39d56dfb436e692 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
--TEST--
various file stat func tests
--FILE--
<?php

var_dump(fileinode("."));
var_dump(fileowner("."));
var_dump(filegroup("."));
var_dump(fileatime("."));
var_dump(filectime("."));

var_dump(fileinode("./.."));
var_dump(fileowner("./.."));
var_dump(filegroup("./.."));
var_dump(fileatime("./.."));
var_dump(filectime("./.."));

var_dump(fileinode(__FILE__));
var_dump(fileowner(__FILE__));
var_dump(filegroup(__FILE__));
var_dump(fileatime(__FILE__));
var_dump(filectime(__FILE__));

var_dump(fileinode("/no/such/file/or/dir"));
var_dump(fileowner("/no/such/file/or/dir"));
var_dump(filegroup("/no/such/file/or/dir"));
var_dump(fileatime("/no/such/file/or/dir"));
var_dump(filectime("/no/such/file/or/dir"));

echo "Done\n";
?>
--EXPECTF--
int(%d)
int(%d)
int(%d)
int(%d)
int(%d)
int(%d)
int(%d)
int(%d)
int(%d)
int(%d)
int(%d)
int(%d)
int(%d)
int(%d)
int(%d)

Warning: fileinode(): stat failed for /no/such/file/or/dir in %s on line %d
bool(false)

Warning: fileowner(): stat failed for /no/such/file/or/dir in %s on line %d
bool(false)

Warning: filegroup(): stat failed for /no/such/file/or/dir in %s on line %d
bool(false)

Warning: fileatime(): stat failed for /no/such/file/or/dir in %s on line %d
bool(false)

Warning: filectime(): stat failed for /no/such/file/or/dir in %s on line %d
bool(false)
Done