repo.or.cz
/
hiphop-php.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
import zend standard tests
[hiphop-php.git]
/
hphp
/
test
/
zend
/
good
/
ext-standard-file
/
basename_variation2.php
blob
512f3c12544adf1b1d9e1bfee0bddb007785dc55
1
<
?php
2
3
$paths
=
array
(
4
5
"foo"
,
6
"foo/"
,
7
"foo
\\
"
,
8
"foo.bar"
,
9
"foo.bar/"
,
10
"foo.bar
\\
"
,
11
"dir/foo.bar"
,
12
"dir
\\
foo.bar"
,
13
"dir with spaces/foo.bar"
,
14
"dir with spaces
\\
foo.bar"
,
15
16
);
17
18
$suffixes
=
array
(
19
20
".bar"
,
21
".b"
,
22
"."
,
23
" "
,
24
"foo"
,
25
"foo.bar"
,
26
"foo/bar"
,
27
"foo
\\
bar"
,
28
"/"
,
29
"
\\
"
,
30
);
31
32
foreach
(
$paths
as
$path
) {
33
foreach
(
$suffixes
as
$suffix
) {
34
echo
"basename for path
$path
, supplying suffix
$suffix
is:
\n
"
;
35
var_dump
(
basename
(
$path
,
$suffix
));
36
}
37
}
38
39
echo
"
\n
done
\n
"
;
40
41
?
>