PHPackages                             tinywan/workerman-event-poll - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. tinywan/workerman-event-poll

ActiveLibrary[Queues &amp; Workers](/categories/queues)

tinywan/workerman-event-poll
============================

Workerman 5.x event loop driver based on the PHP 8.6 Io\\Poll API, with symfony polyfill support for PHP 8.1+

v1.0.0(yesterday)01↑2900%MITPHPPHP &gt;=8.1

Since Aug 16Pushed yesterdayCompare

[ Source](https://github.com/Tinywan/workerman-event-poll)[ Packagist](https://packagist.org/packages/tinywan/workerman-event-poll)[ RSS](/packages/tinywan-workerman-event-poll/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

workerman-event-Poll
====================

[](#workerman-event-poll)

Workerman 5.x event loop driver based on the **PHP 8.6 `Io\Poll` API**, with Symfony polyfill support for PHP 8.1+.

基于 PHP 8.6 新 I/O 轮询 API（`Io\Poll`）的 Workerman 5.x 事件循环驱动，PHP 8.1+ 通过 Symfony polyfill 支持。

Features
--------

[](#features)

- On **PHP 8.6+** it uses the native engine-level implementation: `epoll` (Linux), `kqueue` (macOS/BSD), `WSAPoll` (Windows). No C extension needed.
- On **PHP 8.1 ~ 8.5** it runs through [`symfony/polyfill-io-poll`](https://github.com/symfony/polyfill-io-poll), same API, same driver code.
- Drop-in replacement: implements `Workerman\Events\EventInterface`, works with TCP / HTTP / WebSocket / timers / signals.

Requirements
------------

[](#requirements)

EnvironmentRequirementsPHP 8.6+nothing extraPHP 8.1 ~ 8.5`symfony/polyfill-io-poll` (installed automatically); add `symfony/polyfill-time` if you pin the polyfill to `1.x-dev`POSIX (Linux/macOS)`ext-pcntl`, `ext-posix` (Workerman itself requires them)> Note: `symfony/polyfill-io-poll` releases `^1.41` and `1.x-dev` use different `Context::wait()` signatures. This driver detects the signature at runtime via reflection, so **both work out of the box**.

Installation
------------

[](#installation)

```
composer require tinywan/workerman-event-poll
```

Usage
-----

[](#usage)

```
use Workerman\Worker;
use Workerman\Events\Poll;

Worker::$eventLoopClass = Poll::class;

$worker = new Worker('http://0.0.0.0:8080');
$worker->onMessage = function ($connection, $request) {
    $connection->send('hello');
};

Worker::runAll();
```

Verify with `php examples/server.php status` — the `event-loop` column shows `poll`.

Examples
--------

[](#examples)

```
composer install

# event loop self-test (stream read/write + timers)
php examples/loop-test.php

# TCP (2345) + HTTP (8080) demo server
php examples/server.php start
```

Comparison with built-in drivers
--------------------------------

[](#comparison-with-built-in-drivers)

DriverBackendExtensionNotes**Poll (this package)**Io\\Poll (native epoll/kqueue on 8.6)nonecomposer-only install, auto-upgrades on PHP 8.6Selectstream\_selectnone~1024 fd limit, O(n)Ev / Eventlibev / libeventpecl C extensionhigh performance, needs compilingSwoole / Swowown enginesfull runtime extensionchanges the runtime modelOn PHP &lt; 8.6 the polyfill performs like the Select driver (its value is API compatibility and a zero-change upgrade path). For maximum performance on PHP 8.1~8.5 keep using `Ev`/`Event`.

Known limitations
-----------------

[](#known-limitations)

- Signals are handled via `pcntl_async_signals` (the polyfill only watches stream handles), so a signal may not interrupt a blocking `wait()` until timeout or I/O.
- Edge-triggered events are not supported by the polyfill (level-triggered only, same as Workerman's built-in drivers).

Testing matrix
--------------

[](#testing-matrix)

RuntimeUnit testTCP / HTTPPHP 8.4 + polyfillpasspassPHP 8.6.0beta1 nativepasspassLicense
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0042e0b68ff6a731ef382a03eecd211736c2d619acc55b2b326988085f72bfb?d=identicon)[Tinywan](/maintainers/Tinywan)

---

Top Contributors

[![Tinywan](https://avatars.githubusercontent.com/u/14959876?v=4)](https://github.com/Tinywan "Tinywan (3 commits)")

---

Tags

event-loopasyncworkermankqueueepollio-poll

### Embed Badge

![Health badge](/badges/tinywan-workerman-event-poll/health.svg)

```
[![Health](https://phpackages.com/badges/tinywan-workerman-event-poll/health.svg)](https://phpackages.com/packages/tinywan-workerman-event-poll)
```

###  Alternatives

[amphp/amp

A non-blocking concurrency framework for PHP applications.

4.4k137.6M495](/packages/amphp-amp)[workerman/phpsocket.io

A server side alternative implementation of socket.io in PHP based on Workerman

2.3k603.9k16](/packages/workerman-phpsocketio)[revolt/event-loop

Rock-solid event loop for concurrent PHP applications.

93057.7M255](/packages/revolt-event-loop)[react/promise-timer

A trivial implementation of timeouts for Promises, built on top of ReactPHP.

34150.9M121](/packages/react-promise-timer)[symplely/coroutine

Cooperative multitasking using generators. The basics of coroutines, async and await!

631.6k2](/packages/symplely-coroutine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
