Swoole\Coroutine::getCid ()

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


Latest version: pecl install openswoole-22.1.2

Declaration

<?php Swoole\Coroutine::getCid ()

Parameters

Return

cid

Current coroutine ID.

Description

Get the current Coroutine ID.

Example

<?php
Co\run(function () {
    echo Swoole\Coroutine::getCid();
});
Last updated on August 31, 2022