Annotation of embedaddon/php/ext/standard/tests/file/filesize_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test 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:
! 12: echo "*** Testing size of files and directories with filesize() ***\n";
! 13:
! 14: $file_path = dirname(__FILE__);
! 15:
! 16: var_dump( filesize(__FILE__) );
! 17: var_dump( filesize(".") );
! 18:
! 19: /* Empty file */
! 20: $file_name = $file_path."/filesize_basic.tmp";
! 21: $file_handle = fopen($file_name, "w");
! 22: fclose($file_handle);
! 23: var_dump( filesize($file_name) );
! 24:
! 25: echo "*** Done ***\n";
! 26: ?>
! 27: --CLEAN--
! 28: <?php
! 29: $file_path = dirname(__FILE__);
! 30: $file_name = $file_path."/filesize_basic.tmp";
! 31: unlink($file_name);
! 32: ?>
! 33: --EXPECTF--
! 34: *** Testing size of files and directories with filesize() ***
! 35: int(%d)
! 36: int(%d)
! 37: int(0)
! 38: *** Done ***
! 39:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>