summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/pathinfo.phpt
blob: a3d735069d593ceaca613ce5dd312114e8b84411 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
--TEST--
pathinfo() tests
--FILE--
<?php

var_dump(pathinfo());
var_dump(pathinfo(""));
var_dump(pathinfo("."));
var_dump(pathinfo(".."));
var_dump(pathinfo("/"));
var_dump(pathinfo("./"));
var_dump(pathinfo("/."));
var_dump(pathinfo(".cvsignore"));
var_dump(pathinfo(__FILE__, PATHINFO_BASENAME));
var_dump(pathinfo(__FILE__, PATHINFO_FILENAME));
var_dump(pathinfo(__FILE__, PATHINFO_EXTENSION));
var_dump(pathinfo(__FILE__, PATHINFO_DIRNAME));
var_dump(pathinfo(__FILE__, PATHINFO_EXTENSION|PATHINFO_FILENAME|PATHINFO_DIRNAME));
var_dump(pathinfo(__FILE__, PATHINFO_EXTENSION|PATHINFO_FILENAME|PATHINFO_BASENAME));
var_dump(pathinfo(__FILE__, PATHINFO_EXTENSION|PATHINFO_FILENAME));
var_dump(pathinfo(__FILE__, PATHINFO_EXTENSION|PATHINFO_BASENAME));
var_dump(pathinfo(__FILE__, PATHINFO_FILENAME|PATHINFO_DIRNAME));
var_dump(pathinfo(__FILE__, PATHINFO_FILENAME|PATHINFO_BASENAME));
var_dump(pathinfo(__FILE__, PATHINFO_DIRNAME|PATHINFO_EXTENSION));
var_dump(pathinfo(__FILE__, PATHINFO_DIRNAME|PATHINFO_BASENAME));

echo "Done\n";
?>
--EXPECTF--
Warning: pathinfo() expects at least 1 parameter, 0 given in %s on line %d
NULL
array(2) {
  ["basename"]=>
  string(0) ""
  ["filename"]=>
  string(0) ""
}
array(4) {
  ["dirname"]=>
  string(1) "."
  ["basename"]=>
  string(1) "."
  ["extension"]=>
  string(0) ""
  ["filename"]=>
  string(0) ""
}
array(4) {
  ["dirname"]=>
  string(1) "."
  ["basename"]=>
  string(2) ".."
  ["extension"]=>
  string(0) ""
  ["filename"]=>
  string(1) "."
}
array(3) {
  ["dirname"]=>
  string(1) "%e"
  ["basename"]=>
  string(0) ""
  ["filename"]=>
  string(0) ""
}
array(4) {
  ["dirname"]=>
  string(1) "."
  ["basename"]=>
  string(1) "."
  ["extension"]=>
  string(0) ""
  ["filename"]=>
  string(0) ""
}
array(4) {
  ["dirname"]=>
  string(1) "%e"
  ["basename"]=>
  string(1) "."
  ["extension"]=>
  string(0) ""
  ["filename"]=>
  string(0) ""
}
array(4) {
  ["dirname"]=>
  string(1) "."
  ["basename"]=>
  string(10) ".cvsignore"
  ["extension"]=>
  string(9) "cvsignore"
  ["filename"]=>
  string(0) ""
}
string(12) "pathinfo.php"
string(8) "pathinfo"
string(3) "php"
string(%d) "%s%estrings"
string(%d) "%s%estrings"
string(12) "pathinfo.php"
string(3) "php"
string(12) "pathinfo.php"
string(%d) "%s%estrings"
string(12) "pathinfo.php"
string(%d) "%s%estrings"
string(%d) "%s%estrings"
Done