Skip to content

Introduction

PAM stands for PHP, Always in Memory. It is a runtime that boots your PHP application once and keeps it in memory, serving request after request from the same warm process. The runtime is written in Rust: Tokio handles networking and asynchronous I/O, and PHP runs through the Embed SAPI with each request in its own Fiber.

You keep writing ordinary PHP. Composer is still Composer, your vendor/autoload.php still loads your code, and Laravel is still Laravel. What changes is everything around your code: no bootstrap on every request, native HTTP/1.1, HTTP/2, HTTP/3 and WebSockets, supervised workers, and asynchronous I/O that suspends a Fiber instead of blocking the process.

Traditional PHP PAM
request process starts
├─ bootstrap PHP ├─ start Zend Engine + Tokio
├─ load Composer ├─ load Composer
├─ build application ├─ build application once
├─ execute handler ├─ request 1 ─┐
└─ discard state ├─ request 2 ─┼─ one Fiber each
request └─ request N ─┘
└─ repeat process stays alive
  • Your application boots once. Container wiring, configuration, routes, and OPcache stay warm across requests, so each request only does its own work.
  • One install, no system PHP. The installer ships PAM with its own PHP 8.5 runtime and a curated extension set, and pam composer downloads and verifies Composer on first use. You don’t need PHP, Composer, or Rust on the machine.
  • Built-in server. HTTP/1.1, HTTP/2, HTTP/3, TLS, WebSockets, and server-sent events are handled in Rust. There is no separate web server or FPM pool to configure.
  • Asynchronous when you want it. Timers, HTTP calls, Redis, sockets, and streams can suspend the current Fiber while Tokio waits, so one worker can keep serving other requests.
  • Production operations included. Multi-worker clusters, zero-loss reloads, health and Prometheus endpoints, OpenTelemetry export, and live diagnostics such as pam top come with the runtime.
  • One toolchain for every target. The same pam CLI creates and runs HTTP APIs, Laravel applications, native mobile apps, and desktop apps.

Install PAM, create an API, and run it:

Terminal window
curl -fsSL https://pamphp.com/install | sh
pam doctor
pam init my-api --template api
cd my-api
pam dev

pam dev watches your files and reloads the application when they change. Open http://127.0.0.1:3000/api/ping and you get:

{"message":"pong"}

That response comes from a controller in your new project:

app/Controllers/PingController.php
<?php
declare(strict_types=1);
namespace App\Controllers;
use Pam\Http\Request;
use Pam\Http\Response;
final readonly class PingController
{
public function show(Request $request, Response $response): Response
{
return $response->json(['message' => 'pong']);
}
}

The Installation guide covers every platform, and Your First Application builds on this project.

PAM is one runtime underneath several products. Each one is an ordinary Composer package or project template on top of the same core.

The api and web templates use Nimbus, the API-first PHP framework for PAM: one routes.php file, controllers resolved through a container, form requests, resources, middleware, and the Arcano ORM. You can also skip the framework and write directly against the raw HTTP server.

routes.php
<?php
declare(strict_types=1);
use App\Controllers\PingController;
use Nimbus\RouteRegistrar;
/** @var RouteRegistrar $router */
$router->get('api/ping', [PingController::class, 'show']);

Run an existing Laravel 12 or 13 application on PAM. The application boots once, every request gets an isolated sandbox, and you get managed processes, diagnostics, and OpenTelemetry on top. Laravel Octane applications can use the pushinbr/pam-octane bridge. Start with Laravel on PAM.

PAM Native renders real Android Views and UIKit controls from PHP, with no WebView in between. PHP owns state and composition, Rust validates and reconciles the view tree, and Kotlin or Swift applies the changes on the platform UI thread.

PAM Desktop builds desktop applications in PHP, with native windows, explicit capabilities, signed updates, and distributable packages.

Not sure which one you need? Choose a Target compares them.

PAM is not a new language, a fork of PHP, or a replacement for Composer. A standard composer.json, composer.lock, PSR-4 autoloading, and vendor/autoload.php remain your project contract. PAM itself is not a framework either: routing, validation, and UI come from Composer packages, using the same public extension contract available to community packages.

PAM also does not make every library asynchronous. A blocking extension or synchronous library blocks its worker while it runs. Use PAM’s asynchronous APIs, a process pool, or more workers, depending on the workload; see Async I/O.

The current release is PAM 2.2.27. The CLI, runtime contracts, project templates, and official packages follow Semantic Versioning; Nimbus and Arcano are still on their 0.x lines. Project Status lists exactly what each surface supports and where your responsibility begins, and the Release Notes list what changed recently.