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
 
<Swoole\Channel::popSwoole\Channel::stats>
^Swoole\ChannelLast updated: Mon, 26 Oct 2026

Swoole\Channel::push

(PECL swoole >= 1.9.0)

Swoole\Channel::push — Write and push data into Swoole channel.

Description

public function Swoole\Channel::push(string $data): bool

Data can be any non-empty PHP variable, the variable will be serialized if it is not string type.

If size of the data is more than 8KB, swoole channel will use temp files storage.

The function will return true if the write operation is succeeded, or return false if there is not enough space.

Parameters

data

The data to push into the Swoole channel.

Return Values

Whether the data is pushed into the Swoole channel.


<Swoole\Channel::popSwoole\Channel::stats>
^Swoole\ChannelLast updated: Mon, 26 Oct 2026