Compatibility
PAM runs ordinary PHP and ordinary Composer packages, but it runs them in a long-lived process through PHP’s Embed SAPI instead of PHP-FPM or the CLI. Most code works unchanged; some code needs a second look. This page lists what PAM supports, what is tested, and how to verify your own application before you deploy it.
Compatibility is defined by executable contracts in the PAM repository (compat/composer-smoke and compat/laravel-smoke), not by a successful boot. A green boot is useful evidence; it is not a guarantee for every package and feature.
Platforms
Section titled “Platforms”| Surface | Supported | Not supported or incomplete |
|---|---|---|
| Server runtime | Linux x86_64 and ARM64 (built on Ubuntu 22.04, so glibc 2.35 or newer); macOS arm64 and x86_64 | Windows server releases (use WSL 2 or Docker) |
| Container | The repository Dockerfile (Debian bookworm, PHP 8.5 from a pinned package) |
— |
| PHP | PHP 8.5, embedded in every official release | Other PHP series unless explicitly tested |
| Laravel | Laravel 12 and 13 through PAM Octane | Future Laravel versions until added to the matrix |
| PAM Native | Android and iOS (see PAM Native) | Store signing and device qualification stay with your app |
| PAM Desktop | See PAM Desktop | — |
The installer detects the platform with uname and refuses anything else with unsupported platform.
PHP Version Policy
Section titled “PHP Version Policy”PAM embeds PHP 8.5 by default. This is a product rule, not just the newest entry in a test matrix:
- Official PAM runtime artifacts embed PHP 8.5.
pam initprojects and the official skeleton require PHP^8.5.- Release, container, security and primary compatibility workflows build against PHP 8.5.
PHP 8.4 may stay in explicit compatibility matrices while it is maintained, but it never becomes the implicit runtime. Patch releases within 8.5 advance with PAM releases; a PHP security release is followed by a PAM release with the new runtime. Check what your installation embeds:
pam -r 'echo PHP_VERSION, " ", PHP_SAPI, PHP_EOL;'8.5.13 embedThe Embed SAPI
Section titled “The Embed SAPI”PHP_SAPI is embed in HTTP workers, native application workers and scripts run with pam. Code that branches on fpm-fcgi, apache2handler or cli must be reviewed. Laravel’s Artisan receives an explicit console lifecycle (arguments, standard streams, exit codes, PHP_BINARY and APP_RUNNING_IN_CONSOLE), so console commands behave as in the CLI.
Extensions
Section titled “Extensions”Official Linux releases ship a reviewed extension set:
bcmath calendar ctype curl date dom exif FFI fileinfo filter ftp gd gettext hash iconv intljson lexbor libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_pgsqlpdo_sqlite pgsql Phar posix random Reflection session shmop SimpleXML soap sockets sodiumSPL sqlite3 standard sysvmsg sysvsem sysvshm timezonedb tokenizer uri xml xmlreaderxmlwriter xsl Zend OPcache zip zlibList them on your machine with:
pam -r 'echo implode(" ", get_loaded_extensions()), PHP_EOL;'An extension works when the Embed SAPI can load it and its native libraries are present. Being ABI-compatible is not the same as being safe in a persistent process: test repeated requests, failure cleanup, cancellation and memory behaviour.
Loading Only What You Need
Section titled “Loading Only What You Need”By default every bundled extension is loaded. pam extensions derives the exact set your locked Composer requirements need, and --php-extension loads only those:
pam extensions --no-devpam start index.php --workers 16 --php-extension mbstring --php-extension pdo_pgsqlLoading fewer extensions makes workers start faster (see Performance & Benchmarks). In pam.toml, pin the result with a profile; see Declarative Deploys.
INI Configuration
Section titled “INI Configuration”The pam launcher points PHP at its own INI tree, so PAM never inherits /etc/php by accident:
| Variable | Set by the launcher to |
|---|---|
PHPRC |
<install>/etc/php.ini |
PHP_INI_SCAN_DIR |
<install>/etc/conf.d, followed by $PAM_PHP_INI_SCAN_DIR when set |
To add your own settings, put .ini files in a directory and point PAM_PHP_INI_SCAN_DIR at it, or pass PHP-style flags before the script: -d name=value, -c path/to/php.ini, or -n to skip INI files altogether:
PAM_PHP_INI_SCAN_DIR=/etc/acme/php pam start index.phppam -d memory_limit=512M index.phpComposer Packages
Section titled “Composer Packages”PAM uses Composer without wrappers or a lockfile of its own; the autoloader is discovered from the entry point, including a custom config.vendor-dir. Always install through PAM’s embedded Composer (pam composer ...) so platform checks run against the embedded PHP.
| Category | Status |
|---|---|
| Pure PHP and PSR-4 packages | Work through the normal autoloader |
pushinbr/nimbus |
PAM’s HTTP framework |
pushinbr/pam-socket |
Events and rooms on top of PAM’s native WebSockets |
| PSR-7, PSR-15, PSR-17 | Provided by pushinbr/pam-http-psr with the official interfaces |
| PSR-3 | Used when psr/log is installed |
| PHPUnit and Pest | Run inside the Embed SAPI by pam test |
| Amp, Revolt, ReactPHP | Loaded and exercised with timers and futures in the smoke suite |
| Guzzle, Monolog, OpenTelemetry | Exercised by the smoke suite |
| Illuminate 13 | Container, Events and Pipeline exercised by behaviour |
| Symfony 8 | HttpFoundation and HttpKernel exercised with a real dispatch |
| Slim 4 | App, routing and PSR-7 exercised with a real request |
| Synchronous libraries | Work, but block their worker during the call |
| Code tied to a specific SAPI | Must be validated; PHP_SAPI is embed |
“Compatible with Composer” does not mean every library behaves correctly in a persistent process. A package may need a missing extension, assume FPM or the CLI, install global handlers, or keep request state in singletons. Always run:
pam composer installpam doctorpam testpam doctor validates the Embed runtime, its INI files, the autoloader and Composer’s generated platform check inside PAM. If a PHP CLI is installed, it also compares version, ABI, thread safety, debug build, integer size and extensions, and reports differences as explicit warnings. The CLI is optional; PAM never needs it.
Laravel
Section titled “Laravel”The compat/laravel-smoke contract runs Laravel 12 and 13 on the persistent PAM host, checks the bridge with PHPStan level 9, and tests container isolation and RSS stability. Its matrix covers SQLite, MySQL, PostgreSQL, Redis, the database queue, Artisan, the scheduler, Eloquent, auth and Sanctum, sessions and CSRF, uploads, Flysystem, Blade, Livewire, Inertia, Scout, Reverb, Telescope and Pulse. See the Laravel package matrix for details.
Long-Lived Processes
Section titled “Long-Lived Processes”Your entry point and its global objects live across many requests. PAM resets superglobals, headers, sessions and uploads for every request, but it cannot guess state created by your application or a package. Avoid keeping the request, response, authenticated user, transaction or tenant in static properties. See Memory & State.
For a blocking library you have three options:
- Use its non-blocking (Amp/Revolt) variant, or PAM’s own async APIs.
- Run it in a process pool.
- Add workers and accept that a call occupies one worker while it runs.
Third-Party Event Loops
Section titled “Third-Party Event Loops”Amp 3 runs on Revolt. When a third-party future suspends the root Fiber without a PAM envelope, PAM runs the Revolt loop until that future completes and then resumes the request. Your code and autoloading stay unchanged, but while the third-party loop runs it occupies that worker. For hot paths, prefer Pam\Async, the HTTP client and PAM streams.
Versioning Rules
Section titled “Versioning Rules”First-party contracts separate stable and experimental surfaces. Protocol identifiers and coded values are sequential integers starting at 1; existing identifiers are never renamed, reused or renumbered inside a protocol version. Optional, append-only additions stay compatible; a changed meaning needs a new protocol version. The CLI follows the same rule: pam catalog --compat rejects breaking changes to the command catalog.
What to Test Before Deploying
Section titled “What to Test Before Deploying”Add your application’s real:
- Composer packages and lockfile;
- PHP extensions and INI settings;
- database, cache, queue and storage drivers;
- authentication and tenant lifecycle;
- streamed and binary responses;
- cancellation and timeout paths;
- WebSocket adapter and reconnect behaviour;
- long-running RSS and application memory behaviour.
Next Steps
Section titled “Next Steps”- Installation for supported install paths.
- Production before going live.
- Performance & Benchmarks for measured numbers.