--TEST-- Test filesize() function: usage variations - file size after truncate --SKIPIF-- =-1200; $size-=1200) { $file_handle = fopen($filename, "r+"); var_dump( ftruncate($file_handle, $size) ); fclose($file_handle); var_dump( filesize($filename) ); clearstatcache(); } echo "*** Done ***\n"; ?> --CLEAN-- --EXPECTF-- *** Testing filesize(): usage variations *** -- Testing filesize() after truncating the file to a new length -- bool(true) int(12000) bool(true) int(10800) bool(true) int(9600) bool(true) int(8400) bool(true) int(7200) bool(true) int(6000) bool(true) int(4800) bool(true) int(3600) bool(true) int(2400) bool(true) int(1200) bool(true) int(0) bool(false) int(0) *** Done ***