OpenSwoole\Timer::stats

25.x is outdated, please check the latest version 26.x


Latest version: pecl install openswoole-26.2.0

Declaration

<?php OpenSwoole\Timer::stats()

Parameters

none

Return

array

Stats of the active Timers within the worker process

Description

Get stats of all the currently active timers within the worker process.

OpenSwoole >= v4.4.0 is required

Example

<?php

array(3) {
  ["initialized"]=>
  bool(true)
  ["num"]=>
  int(1000)
  ["round"]=>
  int(1)
}
Last updated on February 28, 2026