略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Event::__construct

2024-12-22

Event::__construct

(PECL event >= 1.2.6-beta)

Event::__constructConstructs Event object

说明

public Event::__construct(
     EventBase $base ,
     mixed $fd ,
     int $what ,
     callable $cb ,
     mixed $arg = NULL
)

Constructs Event object.

参数

base

The event base to associate with.

fd

stream resource, socket resource, or numeric file descriptor. For timer events pass -1 . For signal events pass the signal number, e.g. SIGHUP .

what

Event flags. See Event flags .

cb

The event callback. See Event callbacks .

arg

Custom data. If specified, it will be passed to the callback when event triggers.

返回值

Returns Event object.

参见

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/event.construct.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3