PHPackages                             axcherednikov/eventloop - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. axcherednikov/eventloop

ActivePhp-ext[Utility &amp; Helpers](/categories/utility)

axcherednikov/eventloop
=======================

Native PHP extension providing a high-performance event loop with epoll/kqueue/poll support. API-compatible with Revolt.

v1.1.0(1mo ago)931[1 issues](https://github.com/axcherednikov/php-eventloop/issues)MITCPHP &gt;=8.1CI passing

Since Mar 25Pushed 1mo agoCompare

[ Source](https://github.com/axcherednikov/php-eventloop)[ Packagist](https://packagist.org/packages/axcherednikov/eventloop)[ RSS](/packages/axcherednikov-eventloop/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

ext-eventloop
=============

[](#ext-eventloop)

A native PHP extension that brings a high-performance event loop directly into the engine. Inspired by and API-compatible with [Revolt](https://github.com/revoltphp/event-loop) -- not a replacement, but a **native alternative** written in C for zero-overhead async I/O.

> **Why?** Revolt is an excellent userland library. This extension takes the same proven API design and moves it into a PHP extension, eliminating userland dispatch overhead and leveraging OS-level I/O primitives (epoll, kqueue, poll) directly from C.

Key Differences from Revolt
---------------------------

[](#key-differences-from-revolt)

Revoltext-eventloopImplementationPHP userlandC extensionInstallation`composer require revolt/event-loop``phpize && make install`I/O backendConfigurable (ev, event, uv)Auto-detected (epoll / kqueue / poll / select)Fiber suspensionYesYesAPI contract`Revolt\EventLoop::*``EventLoop\EventLoop::*`The API surface mirrors Revolt's, so migrating between the two is straightforward -- adjust the namespace and you're done.

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

[](#requirements)

- PHP &gt;= 8.1 (Fiber support required)
- A POSIX-compatible OS (Linux, macOS, FreeBSD, etc.)

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

[](#installation)

### Via PIE (recommended)

[](#via-pie-recommended)

```
pie install axcherednikov/eventloop
```

### From source

[](#from-source)

```
git clone https://github.com/axcherednikov/php-eventloop.git
cd php-eventloop

phpize
./configure --enable-eventloop
make
make test
sudo make install
```

Then enable the extension:

```
; php.ini or conf.d/eventloop.ini
extension=eventloop
```

Verify:

```
php -m | grep eventloop
```

Quick Start
-----------

[](#quick-start)

```
