import zend standard tests
[hiphop-php.git] / hphp / test / zend / good / ext-standard-file / is_dir_variation1.php
blob23e197cc62895adab05e64b05f86a049111303ff
1 <?php
2 /* Prototype: bool is_dir ( string $dirname );
3 Description: Tells whether the dirname is a directory
4 Returns TRUE if the dirname exists and is a directory, FALSE otherwise.
5 */
7 /* Testing is_dir() with base and sub dirs */
9 $file_path = dirname(__FILE__);
11 echo "-- Testing is_dir() with an empty dir --\n";
12 $dirname = $file_path."/is_dir_variation1";
13 mkdir($dirname);
14 var_dump( is_dir($dirname) );
15 clearstatcache();
17 echo "-- Testing is_dir() with a subdir in base dir --\n";
18 $subdirname = $dirname."/is_dir_variation1_sub";
19 mkdir($subdirname);
20 var_dump( is_dir($subdirname) );
21 var_dump( is_dir($dirname) );
23 echo "\n*** Done ***";
24 ?><?php
25 $file_path = dirname(__FILE__);
26 $dir_name = $file_path."/is_dir_variation1";
27 rmdir($dir_name."/is_dir_variation1_sub");
28 rmdir($dir_name);