truncate($file, $new_size) The $file value can be either a file name or a file handle. The $new_size value is usually 0, to eliminate all data in a file.