OmniPHP0.x

OPEN SOURCE · PHP 8.4+

PHP, without
the reset.

The universal PHP framework.

The process model of a daemon. The ergonomics of a classic web framework. Build long-running APIs, real-time services and background workers with one lightweight core.

Install with Composer

composer require omniphp/framework
Minimal HTTP server01 / PHP
server.php
<?php
require __DIR__ . '/vendor/autoload.php';

use OmniPHP\Application;
use OmniPHP\Http\{Context, Kernel, Router};
use OmniPHP\Http\Middlewares\ResponseMiddleware;
use Workerman\Worker;

Application::boot(__DIR__);
Application::workerman('server');

Router::group('/api', function () {
    Router::get('/hello/{name}', fn (Context $ctx) => [
        'hello' => $ctx->param('name'),
    ]);
}, [new ResponseMiddleware()]);

$http = new Worker('http://0.0.0.0:8080');
$http->count = 4;
$http->onMessage = [Kernel::class, 'handle'];

Worker::runAll();
Run it
$ php server.php start
HTTP · localhost:8080

No PHP-FPM request lifecycle. Just PHP, Workerman and your application.

+PHP 8.4++Workerman 5+Fiber event loop+MIT licensed

01 / THE TOOLKIT

Everything you need. Nothing you don’t.

Compose your application from a focused set of modules. Use the parts you need, without adopting a heavyweight stack.

/

HTTP & routing

OmniPHP\Http

Typed parameters, route groups, onion middleware, response helpers and sessions.

/

Real-time WebSocket

OmniPHP\WebSocket

Connection management, broadcasts, ping/pong and full-duplex messaging.

/

Database & models

OmniPHP\Database

Fluent queries, migrations, transactions, soft deletes and per-worker connections.

/

Job queues

OmniPHP\Queue

Redis Streams, priorities, delayed jobs, retries and dead-letter handling.

/

Async I/O

OmniPHP\Requests

Fiber-aware HTTP, async MySQL and Redis on the same Revolt scheduler.

/

Application essentials

OmniPHP\Application

Compiled views, file and Redis cache, configuration, locale fallback and logging.

02 / THE RUNTIME

One process. Many requests.

Boot once, then let your workers handle the next request. The Fiber event loop suspends I/O without blocking other work in the same worker.

Boot once per process

Application code and configuration stay loaded across requests. Connections belong to their worker.

A single I/O scheduler

HTTP, MySQL and Redis integrate with the Workerman Fiber loop; no second polling loop required.

Explicit by design

Register routes, middleware and lifecycle hooks yourself. Keep request state separate from long-lived process state.

OMNIPHP / RUNTIMEFIBER
Application bootstrapApplication::boot()
Workerman workers
010203
Fiber / Revolt scheduler
HTTP
MySQL
Redis

Conceptual architecture — not a performance benchmark.

03 / BUILT FOR DEVELOPERS

Familiar PHP. Modern runtime.

Plain PHP classes and familiar APIs, whether you are building an API or a background process.

Fluent queries
use OmniPHP\Database\DB;

$books = DB::table('books')
    ->select('id', 'title')
    ->where('published', 1)
    ->orderBy('id', 'DESC')
    ->limit(20)
    ->get();
Background jobs
use OmniPHP\Queue\Producer;

// Register 'catalog.refresh' in config/queue.php handlers.
$producer = new Producer();
$producer->push('catalog.refresh', ['id' => 7]);
$producer->pushDelayed('catalog.refresh', ['id' => 8], 60);

04 / START BUILDING

Your next PHP project starts here.

Install the framework or start with the ready-made project skeleton. The source is open and the docs are ready to explore.

TERMINAL
composer create-project omniphp/omniphp myapp
cd myapp