Coroutine-first PHP framework

Write PHP that runs
concurrently, not sequentially.

Hyperf blends the ergonomics of a modern component framework with the raw throughput of a persistent, event-driven runtime — so your services stay fast under load and pleasant to work on every day.

app/Controller/OrderController.php
// Three remote calls — executed at the same time.
public function summary(int $userId): array
{
    [$profile, $orders, $score] = parallel([
        fn () => $this->users->find($userId),
        fn () => $this->orders->latest($userId),
        fn () => $this->risk->score($userId),
    ]);

    return ['profile' => $profile, 'orders' => $orders, 'score' => $score];
}
1 process
stays warm — no cold starts
N coroutines
per worker, not per request
PSR-aligned
components you already know
Type-safe
annotations & strict typing
The framework

Familiar patterns. A radically faster foundation.

If you have used a mainstream PHP framework, you will feel at home: dependency injection, middleware, routing, ORM and templating all live where you expect them. The difference is what happens underneath — and what that unlocks in your code.

◇

Coroutines everywhere

Blocking-looking code that actually suspends and yields. A database query or HTTP call waits in the background while thousands of other requests keep moving.

⬡

True dependency injection

A fast, autowiring container resolves services, proxies and abstract contracts without a wall of configuration files. Swap implementations in one line.

◈

Aspect-oriented programming

Cross-cutting concerns — caching, transactions, logging, tracing — attach as aspects instead of leaking into business logic.

◎

Connection pooling

Database, Redis and RPC clients are pooled and reused across coroutines. No handshake storm, no connection exhaustion, no latency tax on every call.

⬢

Built for microservices

Service discovery, RPC, circuit breaking and distributed tracing come as first-class components, not afterthought plugins stitched together by hand.

✦

Strict, modern PHP

Typed annotations, generics-style docblocks and a plugin architecture that keeps the core lean while the ecosystem stays endlessly extensible.

The engine

Swoole: the runtime that changed what PHP can do.

Traditional PHP treats every request as a disposable moment: boot, handle, destroy. Swoole rewrites that contract. The process stays alive, memory stays loaded, and an event loop with coroutines turns waiting into useful work.

  • ✓

    Event-driven, non-blocking I/O

    Network, file and database operations overlap instead of queueing one behind another.

  • ✓

    Lightweight concurrency

    Coroutines cost far less than threads or processes — tens of thousands of concurrent tasks fit comfortably inside a single worker.

  • ✓

    Persistent runtime

    Frameworks, routes and containers are bootstrapped once and reused, so requests start at the interesting part, not at the loading screen.

  • ✓

    More than an HTTP server

    WebSockets, TCP/UDP services, timers, task workers and HTTP/2 arrive in the same runtime — ideal for gateways and real-time layers.

Where the time goes
Sequential I/O waitinghigh
Process bootstrap per requestmoderate
Coroutine overlap (Swoole)minimal
Useful application workmaximized

Illustrative comparison of typical request lifecycles — the exact balance always depends on the workload and infrastructure.

Design principles

Opinionated where it counts. Flexible everywhere else.

High performance is easy to lose to complexity. The project keeps a short list of principles that protect both speed and developer sanity.

01 / PERFORMANCE

Latency is a feature

Every layer — container, router, connection pool — is designed to keep the hot path short, so the framework overhead disappears into the noise of real work.

02 / STANDARDS

Interoperability by default

Components follow widely accepted PHP interfaces, which means libraries, tools and habits from the broader ecosystem keep working without adapters.

03 / MODULARITY

Small core, wide ecosystem

What you do not need is not loaded. A plugin architecture lets the community grow the framework in every direction without bloating the center.

04 / TOOLING

Smooth feedback loops

Async task offloading, graceful reloads and a healthy development workflow keep iteration fast — both on the machine and in production.

Where it shines

Built for systems that talk to other systems.

Whenever a request fans out into databases, caches and downstream APIs, concurrency stops being a luxury and starts being the whole game.

API gateways

Aggregate a dozen upstream services in parallel and return a single response in the time of the slowest call — not the sum of all of them.

Real-time applications

Chat, live dashboards, notifications and streaming feeds run on the same runtime that serves your HTTP traffic.

Microservice backends

Typed RPC, service discovery and resilience patterns give small teams a solid base for a distributed architecture.

High-traffic web apps

A warm process and pooled connections absorb traffic spikes without the latency cliff of per-request bootstrap.

IoT & TCP services

Long-lived connections, custom protocols and massive fan-in are a natural fit for the coroutine-based networking layer.

Data pipelines

Concurrent producers and consumers, timers and task workers handle background processing without bolting on extra infrastructure.

The takeaway

Stop letting your framework wait in line.

Hyperf pairs a clean, component-based developer experience with a runtime engineered for concurrency — the combination modern PHP services have been waiting for.