Swoole\Atomic\Long->cmpset

Notice: ext-swoole is supported until v4.7.1, use ext-openswoole >= v4.7.1. Latest version: pecl install openswoole-4.9.1

Declaration

<?php
Swoole\Atomic\Long->cmpset ( int $cmp = 0, int $new = 0 )

Parameters

cmp

The old value to compare with.

new

The new value

Return

Description

Compare and set the value of the atomic object. See more about Compare and set.

Example