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 * Passing a non-existent directory as argument to dir() function
10 * and checking to see if proper warning message is output.
12 echo "*** Testing dir() : open a non-existent directory ***\n";
14 // create the temporary directory
15 $file_path = dirname(__FILE__
);
16 $dir_path = $file_path."/dir_variation6";
19 // open existent directory
21 $d->close(); //close the dir
23 // remove directory and try to open the same(non-existent) directory again
27 echo "-- opening previously removed directory --\n";
28 var_dump( dir($dir_path) );
30 // point to a non-existent directory
31 $non_existent_dir = $file_path."/non_existent_dir";
32 echo "-- opening non-existent directory --\n";
33 $d = dir($non_existent_dir);