1--TEST-- 2Test filesize() function: basic functionaity 3--FILE-- 4<?php 5/* 6 * Prototype: int filesize ( string $filename ); 7 * Description: Returns the size of the file in bytes, or FALSE 8 * (and generates an error of level E_WARNING) in case of an error. 9 */ 10 11 12echo "*** Testing size of files and directories with filesize() ***\n"; 13 14$file_path = dirname(__FILE__); 15 16var_dump( filesize(__FILE__) ); 17var_dump( filesize(".") ); 18 19/* Empty file */ 20$file_name = $file_path."/filesize_basic.tmp"; 21$file_handle = fopen($file_name, "w"); 22fclose($file_handle); 23var_dump( filesize($file_name) ); 24 25echo "*** Done ***\n"; 26?> 27--CLEAN-- 28<?php 29$file_path = dirname(__FILE__); 30$file_name = $file_path."/filesize_basic.tmp"; 31unlink($file_name); 32?> 33--EXPECTF-- 34*** Testing size of files and directories with filesize() *** 35int(%d) 36int(%d) 37int(0) 38*** Done *** 39 40