Swoole\Atomic->cmpset

4.x is outdated, please check the latest version 22.x


Latest version: pecl install openswoole-22.1.2

Declaration

<?php Swoole\Atomic->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

Last updated on August 31, 2022