PHP Function Reference

PHP streamWrapper stream_truncate() Method



The PHP streamWrapper::stream_truncate() method truncates the stream. This method is called in response to truncation, e.g., through ftruncate() function.

Syntax

public streamWrapper::stream_truncate(new_size)

Parameters

new_size Required. Specify the new size.

Return Value

Returns true on success or false on failure.


❮ PHP Streams Reference