-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
faq.html
43 lines (39 loc) · 2.13 KB
/
faq.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
title: Frequently Asked Questions
permalink: /faq
layout: base
---
<div class="content site-width">
<h1>Frequently Asked Questions</h1>
<h3>What is AMPHP?</h3>
<p>
AMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind.
<code>amphp/amp</code> is the core package providing futures and cancellations.
With AMPHP v3 the event loop moved to its own organization in collaboration with the ReactPHP team and others, which is now known as <a href="https://revolt.run/">Revolt</a>.
</p>
<h3>When should I use AMPHP?</h3>
<p>
AMPHP is always useful if you have I/O-bound tasks that can run concurrently, e.g. making two HTTP requests
concurrently instead of sequentially and operating on the result of both. Such I/O-bound tasks include <a
href="https://github.com/amphp/websocket-server">WebSocket servers</a> and <a href="https://github.com/Room-11/Jeeves">chat
bots</a>.
</p>
<h3>Why should I use AMPHP over other solutions like ReactPHP?</h3>
<p>
AMPHP makes asynchronous code more readable with first-class fiber support instead of promises and <code>then</code>-chains
and generally has more focus on performance.
However, there's no reason to lock into either of these ecosystems, because they're fully compatible!
You can use <a href="https://amphp.org/react-adapter"><code>amphp/react-adapter</code></a> for AMPHP v2 and
<a href="https://github.com/revoltphp/event-loop-adapter-react"><code>revolt/event-loop-adapter-react</code></a> for AMPHP v3
and choose any library from the ReactPHP, AMPHP, or Revolt ecosystem.
</p>
<h3>How can I contribute?</h3>
<p>
Everyone can help. To get started, there are <a
href="https://github.com/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+user%3Aamphp">open discussions on
GitHub</a> you can contribute to.
Found something you could work on? Comment and open a pull request. Missing a specific package that isn't async
compatible? Write it.
Have feedback? Great!
</p>
</div>