Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<streamWrapper::stream_tellstreamWrapper::stream_write>
^streamWrapperLast updated: Mon, 26 Oct 2026

streamWrapper::stream_truncate

(PHP 5 >= 5.4.0, PHP 7, PHP 8)

streamWrapper::stream_truncate — Truncate stream

Description

public function streamWrapper::stream_truncate(int $new_size): bool

Will respond to truncation, e.g., through ftruncate().

Parameters

new_size

The new size.

Return Values

Returns true on success or false on failure.

See Also


<streamWrapper::stream_tellstreamWrapper::stream_write>
^streamWrapperLast updated: Mon, 26 Oct 2026