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\Atomic::setSwoole\Buffer>
^Swoole\AtomicLast updated: Mon, 26 Oct 2026

Swoole\Atomic::sub

(PECL swoole >= 1.9.0)

Swoole\Atomic::sub — Subtract a number to the value of the atomic object.

Description

public function Swoole\Atomic::sub(int $sub_value = ?): int

Subtract a number to the value of the atomic object.

Parameters

sub_value

The value which will be subtracted to the current value.

Return Values

The current value of the atomic object.


<Swoole\Atomic::setSwoole\Buffer>
^Swoole\AtomicLast updated: Mon, 26 Oct 2026