OpenSwoole\Coroutine::getCid ()

Latest version: pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5

Declaration

<?php OpenSwoole\Coroutine::getCid ()

Parameters

Return

cid

Current coroutine ID.

Description

Get the current Coroutine ID.

Example

<?php
co::run(function () {
    echo OpenSwoole\Coroutine::getCid();
});
Last updated on September 1, 2022