PHPackages                             amphp/react-adapter - 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. amphp/react-adapter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

amphp/react-adapter
===================

Adapter to make any ReactPHP library compatible with Amp.

v2.1.0(6y ago)24180.0k↓32.7%5[2 issues](https://github.com/amphp/react-adapter/issues)4MITPHPCI failing

Since Jun 15Pushed 3y ago5 watchersCompare

[ Source](https://github.com/amphp/react-adapter)[ Packagist](https://packagist.org/packages/amphp/react-adapter)[ RSS](/packages/amphp-react-adapter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (4)

amphp/react-adapter
===================

[](#amphpreact-adapter)

[![Stable](https://camo.githubusercontent.com/1cf378d574fdb63d2c0f4d89cb19d1c8fa0080ab98d15713363abc796ad9b2d9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73746162696c6974792d737461626c652d677265656e2e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/1cf378d574fdb63d2c0f4d89cb19d1c8fa0080ab98d15713363abc796ad9b2d9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73746162696c6974792d737461626c652d677265656e2e7376673f7374796c653d666c61742d737175617265)[![License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)

`amphp/react-adapter` makes any [ReactPHP](https://reactphp.org/) library compatible with [Amp](https://github.com/amphp/amp) v2.

> **Note**If you're using AMPHP v3, have a look at [`revolt/event-loop-adapter-react`](https://github.com/revoltphp/event-loop-adapter-react) instead.

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

[](#installation)

This package can be installed as a [Composer](https://getcomposer.org/) dependency.

```
composer require amphp/react-adapter
```

Usage
-----

[](#usage)

Everywhere where a ReactPHP library requires an instance of `LoopInterface`, you pass `ReactAdapter::get()` to run the ReactPHP library on Amp's event loop.

```
