Join 4,000+ others and never miss out on new tips, tutorials, and more.
4.x is outdated, please check the latest version 25.xLatest version: pecl install openswoole-25.2.0
4.x is outdated, please check the latest version 25.x
Latest version: pecl install openswoole-25.2.0
pecl install openswoole-25.2.0
<?php Swoole\Atomic\Long->get()
Get current value of the a Atomic counter.
Atomic
<?php $counter = new Swoole\Atomic(123); echo $counter->add(12)."\n"; echo $counter->sub(11)."\n"; echo $counter->cmpset(122, 999)."\n"; echo $counter->cmpset(124, 999)."\n"; echo $counter->get()."\n";