import zend standard tests
[hiphop-php.git] / hphp / test / zend / bad / ext-standard-file / disk_free_space_error-win32.php
blob792050cf921dde9d309cca5c5c21590c62a4e4d4
1 <?php
2 /*
3 * Prototype: float disk_free_space( string directory )
4 * Description: Given a string containing a directory, this function will
5 * return the number of bytes available on the corresponding
6 * filesystem or disk partition
7 */
9 echo "*** Testing error conditions ***\n";
10 $file_path = dirname(__FILE__);
11 var_dump( disk_free_space() ); // Zero Arguments
12 var_dump( diskfreespace() );
14 var_dump( disk_free_space( $file_path, "extra argument") ); // More than valid number of arguments
15 var_dump( diskfreespace( $file_path, "extra argument") );
18 var_dump( disk_free_space( $file_path."/dir1" )); // Invalid directory
19 var_dump( diskfreespace( $file_path."/dir1" ));
21 $fh = fopen( $file_path."/disk_free_space.tmp", "w" );
22 fwrite( $fh, " Garbage data for the temporary file" );
23 var_dump( disk_free_space( $file_path."/disk_free_space.tmp" )); // file input instead of directory
24 var_dump( diskfreespace( $file_path."/disk_free_space.tmp" ));
25 fclose($fh);
27 echo"\n-- Done --";
28 ?><?php
29 $file_path = dirname(__FILE__);
30 unlink($file_path."/disk_free_space.tmp");