3 * Prototype : object dir(string $directory[, resource $context])
4 * Description: Directory class with properties, handle and class and methods read, rewind and close
5 * Source code: ext/standard/dir.c
9 * Create more than one temporary directory & subdirectory and check if dir() function can open
10 * those directories when wildcard characters are used to refer to them.
13 echo "*** Testing dir() : checking with wildcard characters ***\n";
15 // create the temporary directories
16 $file_path = dirname(__FILE__
);
17 $dir_path = $file_path."/dir_variation81";
18 $sub_dir_path = $dir_path."/sub_dir1";
21 @mkdir
($sub_dir_path);
23 /* with different wildcard characters */
25 echo "-- wildcard = '*' --\n";
26 var_dump( dir($file_path."/dir_var*") );
27 var_dump( dir($file_path."/*") );
29 echo "-- wildcard = '?' --\n";
30 var_dump( dir($dir_path."/sub_dir?") );
31 var_dump( dir($dir_path."/sub?dir1") );