@@ -14,14 +14,37 @@ var_dump(pathinfo(__FILE__, PATHINFO_BASENAME));
1414var_dump (pathinfo (__FILE__ , PATHINFO_FILENAME ));
1515var_dump (pathinfo (__FILE__ , PATHINFO_EXTENSION ));
1616var_dump (pathinfo (__FILE__ , PATHINFO_DIRNAME ));
17- var_dump (pathinfo (__FILE__ , PATHINFO_EXTENSION |PATHINFO_FILENAME |PATHINFO_DIRNAME ));
18- var_dump (pathinfo (__FILE__ , PATHINFO_EXTENSION |PATHINFO_FILENAME |PATHINFO_BASENAME ));
19- var_dump (pathinfo (__FILE__ , PATHINFO_EXTENSION |PATHINFO_FILENAME ));
20- var_dump (pathinfo (__FILE__ , PATHINFO_EXTENSION |PATHINFO_BASENAME ));
21- var_dump (pathinfo (__FILE__ , PATHINFO_FILENAME |PATHINFO_DIRNAME ));
22- var_dump (pathinfo (__FILE__ , PATHINFO_FILENAME |PATHINFO_BASENAME ));
23- var_dump (pathinfo (__FILE__ , PATHINFO_DIRNAME |PATHINFO_EXTENSION ));
24- var_dump (pathinfo (__FILE__ , PATHINFO_DIRNAME |PATHINFO_BASENAME ));
17+
18+ try {
19+ pathinfo (__FILE__ , PATHINFO_EXTENSION |PATHINFO_FILENAME |PATHINFO_DIRNAME );
20+ } catch (\ValueError $ e ) {
21+ echo $ e ->getMessage (), PHP_EOL ;
22+ }
23+ try {
24+ pathinfo (__FILE__ , PATHINFO_EXTENSION |PATHINFO_FILENAME );
25+ } catch (\ValueError $ e ) {
26+ echo $ e ->getMessage (), PHP_EOL ;
27+ }
28+ try {
29+ pathinfo (__FILE__ , PATHINFO_EXTENSION |PATHINFO_DIRNAME );
30+ } catch (\ValueError $ e ) {
31+ echo $ e ->getMessage (), PHP_EOL ;
32+ }
33+ try {
34+ pathinfo (__FILE__ , PATHINFO_FILENAME |PATHINFO_BASENAME );
35+ } catch (\ValueError $ e ) {
36+ echo $ e ->getMessage (), PHP_EOL ;
37+ }
38+ try {
39+ pathinfo (__FILE__ , PATHINFO_DIRNAME |PATHINFO_EXTENSION );
40+ } catch (\ValueError $ e ) {
41+ echo $ e ->getMessage (), PHP_EOL ;
42+ }
43+ try {
44+ pathinfo (__FILE__ , PATHINFO_DIRNAME |PATHINFO_BASENAME );
45+ } catch (\ValueError $ e ) {
46+ echo $ e ->getMessage (), PHP_EOL ;
47+ }
2548
2649try {
2750 pathinfo (__FILE__ , PATHINFO_DIRNAME -1 );
@@ -105,14 +128,12 @@ string(12) "pathinfo.php"
105128string(8) "pathinfo"
106129string(3) "php"
107130string(%d) "%s%estrings"
108- string(%d) "%s%estrings"
109- string(12) "pathinfo.php"
110- string(3) "php"
111- string(12) "pathinfo.php"
112- string(%d) "%s%estrings"
113- string(12) "pathinfo.php"
114- string(%d) "%s%estrings"
115- string(%d) "%s%estrings"
131+ pathinfo(): Argument #2 ($flags) must be only one of the PATHINFO_* constants
132+ pathinfo(): Argument #2 ($flags) must be only one of the PATHINFO_* constants
133+ pathinfo(): Argument #2 ($flags) must be only one of the PATHINFO_* constants
134+ pathinfo(): Argument #2 ($flags) must be only one of the PATHINFO_* constants
135+ pathinfo(): Argument #2 ($flags) must be only one of the PATHINFO_* constants
136+ pathinfo(): Argument #2 ($flags) must be only one of the PATHINFO_* constants
116137pathinfo(): Argument #2 ($flags) must be one of the PATHINFO_* constants
117138pathinfo(): Argument #2 ($flags) must be one of the PATHINFO_* constants
118139Done
0 commit comments