OpenSwoole\Timer::info

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


Latest version: pecl install openswoole-26.2.0

Declaration

<?php OpenSwoole\Timer::info(int $timerId)\:\ array

Parameters

timerId

The ID of the Timer to get information for

Return

success

if success, it returns an array of information about the timer

fail

if it fails false will be returned

Description

Return information about the given timer ID. See example for the information returned.

OpenSwoole >= v4.4.0 is required

Example

<?php

$timerInfo = OpenSwoole\Timer::info($timerId);

var_dump(timerInfo);

// Output:

array(4) {
  ["exec_msec"]=>
  int(1000)
  ["interval"]=>
  int(0)
  ["round"]=>
  int(0)
  ["removed"]=>
  bool(false)
}
Last updated on February 28, 2026