import zend standard tests
[hiphop-php.git] / hphp / test / zend / good / ext-standard-file / filesize_basic.php
bloba5361e399a687e3a4760c8695be6cbdd2342e167
1 <?php
2 /*
3 * Prototype: int filesize ( string $filename );
4 * Description: Returns the size of the file in bytes, or FALSE
5 * (and generates an error of level E_WARNING) in case of an error.
6 */
9 echo "*** Testing size of files and directories with filesize() ***\n";
11 $file_path = dirname(__FILE__);
13 var_dump( filesize(__FILE__) );
14 var_dump( filesize(".") );
16 /* Empty file */
17 $file_name = $file_path."/filesize_basic.tmp";
18 $file_handle = fopen($file_name, "w");
19 fclose($file_handle);
20 var_dump( filesize($file_name) );
22 echo "*** Done ***\n";
23 ?><?php
24 $file_path = dirname(__FILE__);
25 $file_name = $file_path."/filesize_basic.tmp";
26 unlink($file_name);