2 /* Prototype: array glob ( string $pattern [, int $flags] );
3 Description: Find pathnames matching a pattern
6 $file_path = dirname(__FILE__
);
9 mkdir("$file_path/glob_error");
11 $fp = fopen("$file_path/glob_error/wonder12345", "w");
14 echo "*** Testing glob() : error conditions ***\n";
16 echo "-- Testing glob() with unexpected no. of arguments --\n";
17 var_dump( glob() ); // args < expected
18 var_dump( glob(dirname(__FILE__
)."/glob_error/wonder12345", GLOB_ERR
, 3) ); // args > expected
20 echo "\n-- Testing glob() with invalid arguments --\n";
21 var_dump( glob(dirname(__FILE__
)."/glob_error/wonder12345", '') );
22 var_dump( glob(dirname(__FILE__
)."/glob_error/wonder12345", "string") );
27 unlink(dirname(__FILE__
)."/glob_error/wonder12345");
29 rmdir(dirname(__FILE__
)."/glob_error");