PHPUNCHAINED - Modern Stateful PHP Runtime & Structured Concurrency Framework

Bring runtime awareness to PHP.

An orchestration-aware execution environment bringing ownership, lifecycles, and structured concurrency directly to the PHP process.

Positioning & Architecture

Runtime awareness for modern PHP

Traditional PHP starts from scratch on every request, wasting CPU cycles on bootstrapping. Nexphant runs a persistent event-loop that holds resources and memory warm.

PHP was built for a shared-nothing architecture, which made it simple but slow. Nexphant unchains the PHP process, moving from transient scripts to a persistent, stateful application runtime.

The Bootstrapping Tax

Every query boots the framework from scratch, spending 10-30ms parsing configs and initializing services.

Persistent Runtime Loop

Workers boot once, keeping connections warm and routing requests directly through concurrent Fibers.

Traditional Request Lifecycle
Wasted Cycles
HTTP GET #1
Boot (15ms)
Connect (10ms)
Run (2ms)
37ms
HTTP GET #2
Boot (15ms)
Connect (10ms)
Run (2ms)
37ms
HTTP GET #3
Boot (15ms)
Connect (10ms)
Run (2ms)
84%CPU wasted in bootstrapping
100%
Persistent workersPre-warmed and memory-preserved daemons.
Fiber
Shared lifecycleCooperative scheduling under a single process.
<1ms
Less bootstrap overheadZero class reloading or config parsing cycles.

VISUAL ARCHITECTURE

Three Engines. One Runtime.

Nexphant separates transport handling, runtime orchestration, and lifecycle ownership into cooperative persistent execution layers for modern PHP applications.

Layer 1

Transport Engine

HTTPWebSocketSocketsSSEStreaming
Layer 2

Runtime Engine

FibersWorkersEvent LoopSchedulersTimers
Layer 3

Lifecycle Engine

OwnershipGraceful DrainCancellationCleanup Safety
Architecture Overview

Persistent Runtime Architecture

Nexphant isolates transport handling, runtime orchestration, and lifecycle ownership into dedicated persistent execution layers designed for modern stateful PHP systems.

Transport Engine

Handles sockets, HTTP, WebSocket, SSE, streaming protocols, connection upgrades, and transport dispatching.

Runtime Engine

Controls workers, fibers, queues, schedulers, timers, cooperative execution, and runtime orchestration.

Lifecycle Engine

Tracks ownership, cancellation, cleanup, graceful draining, persistent state, and runtime resource lifecycles.

Persistent Workers

Workers stay warm in memory, bypassing standard script startup cycles.

Cooperative Fibers

Non-blocking concurrency driven directly by an in-process scheduler.

Lifecycle Ownership

Automatic context tracking prevents memory leaks and stale sockets.

Developer Onboarding

Familiar PHP syntax.
Runtime-native power.

Write standard PHP, then run it through a persistent runtime built for workers, fibers, queues, and lifecycle-aware execution.

nexphant-app/app.php
NEXPHANT RUNTIME
EXPLORER
🐘Hello World
🐘Routing
🐘Queues
🐘Middleware
🐘Attributes
🐘Views
🐘Hello World
🐘Routing
🐘Queues
🐘Middleware
🐘Attributes
🐘Views
1234567891011
<?php

use Nexphant\App;

$app = App::create();

$app->get('/', fn () => [
    'message' => 'Hello Nexphant',
]);

$app->listen(8080);
01Install
composer create-project nexphant/nexphant my-app
02Run
composer run dev
03Build

Start with routes, workers, queues, and runtime services.

Load Test Benchmark

Transparent Performance Stats

Benchmarks are shown separately for static JSON baseline and SQLite WAL workload.

Static JSON measures raw transport/runtime response overhead.

Benchmark Context

Scriptbenchmarks/k6-test.js
Concurrency1000 VUs
Duration30s
Workload TypeStatic JSON response

Benchmark transparency

Hardware: AMD Ryzen 5 5600H, 16GB RAM, NVMe SSD, CachyOS (Linux 7.0).

Reproducibility Guide & Evidence β†’
throughput0req/s
p95 latency0.00ms
p99 latency0.00ms
failure rate0.00%
Latency Percentiles (lower is better)Sustained Concurrency
Average6.91 ms
Median6.20 ms
p9514.82 ms
p9925.61 ms
p99.938.21 ms

ARCHITECTURE MAP

Composable Runtime Ecosystem

Nexphant separates transport handling, runtime orchestration, lifecycle ownership, and infrastructure tooling into modular persistent execution layers.

nexphant/framework
nexphant/scheduler
nexphant/cache
nexphant/support
nexphant/observability
nexphant/queue
nexphant/lifecycle
nexphant/runtime
nexphant/core
nexphant/console
nexphant/database

Persistent Runtime Platform

Nexphant composes transport handling, cooperative runtime orchestration, lifecycle ownership, and infrastructure services into a unified persistent execution platform for PHP.

Transport Layer

Sockets, HTTP, WebSocket, SSE, streaming dispatch.

Runtime Layer

Workers, fibers, queues, schedulers, orchestration.

Lifecycle Layer

Ownership tracking, cleanup, cancellation, graceful draining.

INSPIRED BY THE ECOSYSTEM

Built on the shoulders of async PHP pioneers.

Nexphant learns from the projects that pushed PHP beyond the traditional request-response lifecycle from event loops and fibers to persistent workers, servers, and runtime bridges.

β€œDifferent ideas. Shared direction. A faster, persistent future for PHP.”

Join the community

Nexphant is open-source. Follow the development, contribute ideas, or help shape the runtime layer for modern PHP.