# amphp/amp

A non-blocking concurrency framework for PHP applications. 🐘

Repository: https://github.com/amphp/amp
Canonical: https://ross.abutalabs.com/products/amp
Homepage: https://amphp.org/amp
Language: PHP
License: MIT
License Family: permissive
Topics: php, async, coroutines, promises, amphp, asynchronous, concurrency, futures, revolt
Last push: 2026-07-26T14:55:05+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 94, release rhythm 71, longevity 100
- inputs: {"age_days": 4776, "days_push": 38, "days_rel": 38, "gap_med": 124.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4432, forks 257 (observed 2026-08-28T04:08:49.160915+00:00)

## What it is
amphp/amp is the core library of the AMPHP ecosystem, providing futures, coroutines, and cancellation primitives for non-blocking, event-driven concurrency in PHP. It builds on PHP 8.1 fibers and the Revolt event loop, letting developers write asynchronous code that reads like synchronous code.

## Use cases
- run multiple HTTP requests concurrently in PHP
- make non-blocking database queries in PHP
- write async PHP without callbacks or promise chains
- build WebSocket servers or chat bots in PHP
- parallelize I/O-bound tasks in a PHP CLI script
- cancel long-running async operations in PHP

## When to choose
- you have I/O-bound PHP workloads that benefit from concurrency
- you want fiber-based async code that looks synchronous
- you're building on the AMPHP or Revolt ecosystem of packages
- you need futures and structured cancellation primitives

## When to avoid
- your workload is CPU-bound rather than I/O-bound
- you're stuck on PHP versions older than 8.1
- your app is simple and blocking I/O causes no performance issues
- you need true parallelism across CPU cores (consider amphp/parallel or threads)

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, http-client, websocket, middleware
- domain: web-development, backend, developer-tools, networking
- platform: php, cli, cross-platform
- tags: async, fibers, coroutines, futures, event-loop, non-blocking-io, revolt, cancellation, web-server

## Member repositories
- amphp/amp (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:49.160915+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:20:53.778216+00:00, confidence not recorded.
  - readme: https://github.com/amphp/amp (fetched 2026-08-28T04:08:49.160915+00:00, sha 6cb88ccdb138)
  - homepage: https://amphp.org/amp (fetched 2026-08-29T09:08:17.663115+00:00, sha 1d72cc1978c9)
  - site_page: https://amphp.org/installation (fetched 2026-08-29T09:08:17.672708+00:00, sha 41a9417c174e)
  - site_page: https://v3.amphp.org/installation (fetched 2026-08-29T09:08:17.676864+00:00, sha 85f9721f7d69)
  - site_page: https://amphp.org/faq (fetched 2026-08-29T09:08:17.674938+00:00, sha 180e2ae49605)
- Data as of 2026-08-30T08:39:29.467469+00:00.
