Benchmarks and method

Plain PHP and five frameworks serve the same four pages with the same output, on the same PHP version, each in its own production mode: on nginx with php-fpm, and in FrankenPHP worker mode for the frameworks that have one. Every number below comes from one run and can be traced to its raw output.

Run 2026-12-01-worker, 1 December 2026. Taphra 1.0.0. PHP 8.4.28.

Summary

  • Plain PHP, with no framework, has the highest requests per second on every page.
  • On php-fpm, among the frameworks, Taphra has the highest requests per second on three pages: plain-text hello (7,670; next is Slim at 5,757), JSON with a route parameter (7,675; Slim 5,579) and the HTML page (6,518; Slim 4,895).
  • On php-fpm's database page, with a new SQLite connection per request, Slim 4.15.3 is faster than Taphra: 4,729 against 4,241 requests per second. With its default persistent database handle, Taphra serves that page at 5,137.
  • Taphra's production install has 26 Composer packages and a 6.3 MB vendor/ folder. Slim 4.15.3 has 20 and 2.1 MB; Laravel 13.44.1 has 77 and 28.1 MB.
  • In worker mode (FrankenPHP), Taphra has the highest requests per second among the frameworks on plain-text hello (10,753; next is Symfony at 7,758), JSON (10,424; Symfony 7,266) and the HTML page (8,939; Symfony 6,848). On the database page Symfony is faster: 5,786 against 5,406.
  • Worker mode helps most where booting costs most: against their own php-fpm numbers, Symfony gains 2.16x on hello and Laravel with Octane 1.99x; Taphra, which does little at boot, gains 1.40x. Plain PHP and CodeIgniter are slower in worker mode on these pages.
  • Taphra on php-fpm serves more requests than Laravel with Octane on every page (7,670 against 2,812 on hello).
  • No request failed in any run.

Requests per second on php-fpm

nginx with php-fpm: the app boots on every request. Median of 3 runs of 30 seconds after a 10 second warm-up.

Requests per second on each page, median of the runs
Setup Plain-text hello JSON with a route parameter One SQLite row as JSON HTML page, layout and 20 escaped items
Plain PHP 22,320 21,678 10,795 17,878
Taphra 1.0.0 7,670 7,675 4,241 6,518
Taphra 1.0.0, persistent DB handle not measured not measured 5,137 not measured
Laravel 13.44.1 1,413 1,510 917 1,345
Symfony 8.1.12 3,593 3,356 1,926 2,929
Slim 4.15.3 5,757 5,579 4,729 4,895
CodeIgniter 4.7.6 3,919 3,705 2,600 3,535

Plain-text hello /hello

Hello, World! as text/plain

Plain-text hello: throughput, latency and CPU per setup
Setup Requests per second Lowest to highest run p50 ms p99 ms App CPU ms per request Bytes per response Errors
Plain PHP 22,320 21,887 to 23,494 1.37 2.53 0.166 187 0
Taphra 1.0.0 7,670 7,542 to 8,165 4.07 5.92 0.496 320 0
Slim 4.15.3 5,757 5,708 to 5,949 5.48 7.44 0.686 186 0
CodeIgniter 4.7.6 3,919 3,849 to 4,013 8.04 10.70 1.014 233 0
Symfony 8.1.12 3,593 3,520 to 3,642 8.76 12.12 1.097 221 0
Laravel 13.44.1 1,413 1,309 to 1,458 22.22 30.99 2.805 221 0

JSON with a route parameter /json/bench

{"message":"Hello, bench!"}, the name taken from the route

JSON with a route parameter: throughput, latency and CPU per setup
Setup Requests per second Lowest to highest run p50 ms p99 ms App CPU ms per request Bytes per response Errors
Plain PHP 21,678 20,187 to 22,993 1.41 2.65 0.172 193 0
Taphra 1.0.0 7,675 7,652 to 8,386 4.05 5.86 0.495 341 0
Slim 4.15.3 5,579 5,436 to 5,773 5.61 8.25 0.699 193 0
CodeIgniter 4.7.6 3,705 3,553 to 3,774 8.49 11.82 1.064 254 0
Symfony 8.1.12 3,356 3,351 to 3,486 9.36 12.55 1.169 227 0
Laravel 13.44.1 1,510 1,322 to 1,565 20.75 29.35 2.637 227 0

One SQLite row as JSON /db

One random row of a 10,000-row SQLite table, read through the framework's database layer, as JSON

One SQLite row as JSON: throughput, latency and CPU per setup
Setup Requests per second Lowest to highest run p50 ms p99 ms App CPU ms per request Bytes per response Errors
Plain PHP 10,795 10,555 to 11,193 2.90 4.41 0.354 198 0
Taphra 1.0.0, persistent DB handle 5,137 4,745 to 5,316 6.14 8.33 0.772 346 0
Slim 4.15.3 4,729 4,669 to 4,961 6.62 9.14 0.825 198 0
Taphra 1.0.0 4,241 4,236 to 4,528 7.41 10.02 0.933 346 0
CodeIgniter 4.7.6 2,600 2,426 to 2,658 12.09 16.90 1.512 259 0
Symfony 8.1.12 1,926 1,779 to 2,029 16.31 23.07 2.065 232 0
Laravel 13.44.1 917 876 to 987 34.48 47.09 4.334 232 0

HTML page, layout and 20 escaped items /html

A layout and a view with a title and 20 items, each containing < > & " and ', escaped by the template layer. The page body is 1,940 bytes in every framework.

HTML page, layout and 20 escaped items: throughput, latency and CPU per setup
Setup Requests per second Lowest to highest run p50 ms p99 ms App CPU ms per request Bytes per response Errors
Plain PHP 17,878 17,654 to 18,024 1.73 3.04 0.204 2,115 0
Taphra 1.0.0 6,518 6,353 to 6,759 4.82 6.91 0.595 2,248 0
Slim 4.15.3 4,895 4,659 to 4,953 6.43 8.85 0.807 2,115 0
CodeIgniter 4.7.6 3,535 3,423 to 3,645 8.91 12.23 1.120 2,161 0
Symfony 8.1.12 2,929 2,906 to 3,064 10.74 14.66 1.352 2,149 0
Laravel 13.44.1 1,345 1,214 to 1,407 23.19 33.37 2.958 2,149 0

Footprint

Peak memory is memory_get_peak_usage() at the end of the request, and included files is count(get_included_files()). Both come from a separate pass of 200 requests per page (median), not from the timed runs. Packages and sizes are from the production Composer install.

Composer packages, vendor size, included files and peak memory per setup
Setup Composer packages vendor/ size vendor/ PHP files Included files, hello / json / db / html Peak memory KB, hello / json / db / html
Plain PHP 0 0.0 MB 0 1 / 1 / 1 / 3 348 / 349 / 350 / 368
Taphra 1.0.0 26 6.3 MB 1,412 56 / 55 / 77 / 64 396 / 398 / 421 / 428
Taphra 1.0.0, persistent DB handle 26 6.3 MB 1,412 n/a / n/a / 77 / n/a n/a / n/a / 421 / n/a
Laravel 13.44.1 77 28.1 MB 6,186 410 / 393 / 435 / 419 707 / 662 / 873 / 731
Symfony 8.1.12 52 14.3 MB 3,160 211 / 230 / 381 / 258 513 / 513 / 628 / 541
Slim 4.15.3 20 2.1 MB 578 156 / 156 / 156 / 163 391 / 392 / 392 / 419
CodeIgniter 4.7.6 3 4.0 MB 716 121 / 124 / 139 / 126 459 / 461 / 475 / 497

Notes on the rows

Taphra 1.0.0
Package: the main branch of taphra/taphra, whose framework code is identical to the 1.0.0 release (raw/environment.json, taphra_src_sha256). Skeleton: the templates/skeleton starter. Every page includes app/tmp/tphr_frozen.php and no YAML parser (raw/taphra/included-files-*.txt).
Taphra 1.0.0, persistent DB handle
Same image as Taphra except persistent: true for the bench connection, the framework's default.
CodeIgniter 4.7.6
The image serves each bench page once at build time, so the config cache file is complete before OPcache compiles it. See bench/README.md, "CodeIgniter config cache".
Plain PHP, worker mode
The same index.php as the php-fpm row, required for each request inside FrankenPHP's worker loop. It boots nothing, so it shows what the server costs per request.
Taphra 1.0.0, worker mode
The php-fpm image's app, started from the skeleton's app/Static/frankenphp-worker.php. Per-request state is reset and database handles are dropped before each request, so the db page opens a new SQLite connection per request. Workers are never restarted.
Laravel 13.44.1, worker mode (Octane)
The php-fpm image's app plus Octane 2.26.0, started with php artisan octane:frankenphp, 8 workers and the log level at WARN (no access log, like every other app). Octane's defaults otherwise: a worker reloads after 500 requests, and database connections stay open between requests.
Symfony 8.1.12, worker mode
The php-fpm image's app; symfony/runtime switches to its FrankenPHP worker runner. Each worker restarts after 500 requests (Symfony's default).
CodeIgniter 4.7.6, worker mode
The php-fpm image's app plus the worker entry point from php spark worker:install. CodeIgniter's worker mode refuses to start with the config and file-locator caches on, so those two are turned off. It reconnects its database connections and collects garbage after every request (its defaults).

The CodeIgniter config cache: with spark optimize, CodeIgniter keeps its config objects in a PHP file it writes at run time and extends whenever a request needs a config it does not hold. With opcache.validate_timestamps=0, OPcache keeps the first version it compiles, so a file still missing configs would be rewritten on every request. The image therefore serves each page once at build time, as a deploy that warms its caches would.

Worker mode

FrankenPHP v1.14.0 with PHP 8.4.28 ZTS and 8 PHP workers: the app boots once per worker and stays in memory between requests. Each worker image runs the same app as its php-fpm row, with the same PHP settings, and each framework keeps its own worker-mode defaults (see the notes on the rows). Every framework with an official worker mode is included; Slim has none. Median of 3 runs, in the same run as the php-fpm tables.

Requests per second on each page in worker mode, median of the runs
Setup Plain-text hello JSON with a route parameter One SQLite row as JSON HTML page, layout and 20 escaped items
Plain PHP, worker mode 16,561 15,302 7,010 14,064
Taphra 1.0.0, worker mode 10,753 10,424 5,406 8,939
Laravel 13.44.1, worker mode (Octane) 2,812 2,945 2,421 2,586
Symfony 8.1.12, worker mode 7,758 7,266 5,786 6,848
CodeIgniter 4.7.6, worker mode 2,692 2,564 1,996 2,378

Worker mode against php-fpm

Requests per second in worker mode divided by the same framework's php-fpm number in the same run. Above 1x, worker mode is faster.

Worker mode requests per second divided by php-fpm requests per second, per framework and page
Framework Plain-text hello JSON with a route parameter One SQLite row as JSON HTML page, layout and 20 escaped items
Plain PHP 0.74x 0.71x 0.65x 0.79x
Taphra 1.0.0 1.40x 1.36x 1.27x 1.37x
Laravel 13.44.1 1.99x 1.95x 2.64x 1.92x
Symfony 8.1.12 2.16x 2.17x 3.00x 2.34x
CodeIgniter 4.7.6 0.69x 0.69x 0.77x 0.67x

Latency in worker mode

p50 / p99 in milliseconds, at the same load as the php-fpm runs.

Latency at the 50th and 99th percentile in worker mode, per page
Setup Plain-text hello JSON with a route parameter One SQLite row as JSON HTML page, layout and 20 escaped items
Plain PHP, worker mode 1.88 / 5.21 2.03 / 6.04 4.43 / 9.24 2.22 / 6.17
Taphra 1.0.0, worker mode 2.94 / 7.33 3.03 / 7.75 5.76 / 11.25 3.57 / 8.50
Laravel 13.44.1, worker mode (Octane) 11.03 / 23.63 10.54 / 23.10 12.91 / 25.27 12.03 / 24.58
Symfony 8.1.12, worker mode 4.11 / 9.41 4.40 / 9.86 5.47 / 12.01 4.67 / 10.34
CodeIgniter 4.7.6, worker mode 11.55 / 23.53 12.08 / 24.46 15.74 / 27.57 13.15 / 24.67

Reading the worker-mode numbers

Worker mode saves the work of booting the framework on every request, while the server itself costs more per request than nginx with php-fpm on pages this small: plain PHP, which boots nothing, serves 16,561 hello pages a second in worker mode against 22,320 on php-fpm. A framework gains when its boot costs more than that difference, which is why Symfony and Laravel gain the most and Taphra less. CodeIgniter's worker mode requires turning off two caches its php-fpm setup uses, and it is slower in worker mode on these pages.

Peak memory and included files per request are not measured in worker mode, where the app stays loaded between requests. Laravel's worker image adds Octane; the other worker images have the same Composer packages as their php-fpm images.

Machine and load

Benchmark machine and settings
MachineVirtual machine, AMD EPYC-Rome Processor, 8 CPUs, 15.2 GB RAM
SystemLinux kernel 6.8.0-151-generic, Docker 29.1.3
SoftwarePHP 8.4.28, nginx 1.26.3, FrankenPHP v1.14.0, wrk-4.2.0-r2
App containerCPUs 0-3; php-fpm with 8 static workers and nginx with 2 workers, or FrankenPHP with 8 PHP workers in worker mode
Load generatorwrk on CPUs 4-7, 4 threads, 32 connections
Runs3 rounds; 10 s warm-up and 30 s measured per page
Load average (1, 5, 15 min)2.86 3.08 1.87 at the start, 3.24 6.39 7.56 at the end
Taphrataphra/taphra 1.0.0, installed as Composer installs it from Packagist

The machine was not reserved: other projects' idle containers ran on it. The 1-minute load average was 2.86 before the run and 5.2 to 11.1 at the end of the measured runs, most of that the benchmark itself (the app's workers, the web server and 4 wrk threads on 8 CPUs). In 41 of the 45 measured cells all 3 runs are within 10% of the median; the lowest single run is 12% below its median (Laravel on php-fpm, JSON page). The median leaves such runs out, and the tables list the spread for every php-fpm cell; results.md in the run folder lists it for every cell.

What is measured

Each framework serves four pages at the same URLs, written the way its own documentation writes them: its router, controllers, response objects, database layer and template engine.

The four benchmark pages
PageURLResponse
Plain-text hello/helloHello, World! as text/plain
JSON with a route parameter/json/bench{"message":"Hello, bench!"}, the name taken from the route
One SQLite row as JSON/dbOne random row of a 10,000-row SQLite table, read through the framework's database layer, as JSON
HTML page, layout and 20 escaped items/htmlA layout and a view with a title and 20 items, each containing < > & " and ', escaped by the template layer. The page body is 1,940 bytes in every framework.

No page starts a session, sets a cookie or checks a CSRF token, in any framework. In Laravel that means the routes sit in the api middleware group rather than web, which would start a session on every request. Taphra adds four security headers to every response by default; they are counted in its bytes per response.

Method

  • Same runtime. One base image built from php:8.4.28-fpm-trixie with nginx from Debian. php.ini-production with OPcache on (validate_timestamps=0, 256 MB, JIT off) and no preloading for any framework. One static php-fpm pool of 8 workers on a unix socket; nginx with 2 workers and keep-alive; no access logs.
  • Same install. composer install --no-dev --classmap-authoritative for every framework, then its own production step (see the table below).
  • Same load. wrk 4.2.0 in its own container, sharing the app container's network namespace over loopback and pinned to other CPUs. 4 threads and 32 keep-alive connections. Each page gets a 10 second warm-up that is not counted, then a 30 second measured run.
  • Interleaved rounds. The whole matrix runs 3 times. In each round every framework is started fresh, warmed up and measured on every page, one framework at a time, so slow drift on the machine spreads over all of them.
  • Same output, checked. Before any load, a script requests every page of every framework and checks status, content type and body: exact text and JSON, that the database row matches the SQLite file and changes between requests, and for the HTML page the layout, the title and exactly 20 escaped items. A framework that fails is not measured. During the runs, every non-2xx response, timeout and socket error is counted and shown.
  • Same database work. Every framework opens a new SQLite connection per request, the default for PDO, Laravel, Doctrine and CodeIgniter. Taphra keeps a persistent handle by default, so its main row turns that off and a separate row shows the default.
  • Worker mode. Each worker image copies the finished app of its php-fpm image onto a FrankenPHP base with the same PHP version, the same php.ini and the same SQLite file. One shared server configuration for all: no admin API, no HTTPS, no access log, and 8 PHP threads, all of them workers. Each framework runs in worker mode the way its own documentation sets it up, with its defaults for worker restarts and database connections.
  • Memory and files come from a separate pass with an auto_prepend_file that records memory_get_peak_usage() and count(get_included_files()) at the very end of each request: 50 requests to warm up, then 200 measured. Compiled code lives in OPcache shared memory and is not part of the per-request memory.
How each app was created and prepared for production
SetupCreated withProduction stepsDatabase layerTemplates
Plain PHPWritten by hand, no ComposerNonePDOPHP files with htmlspecialchars()
Taphra 1.0.0The repository's templates/skeleton, unchanged, with the bench pages addedProduction mode (APP_ENV not set), php taphra optimizeDataStore, findById().tpl.php view in a .lyt.php layout, e()
Laravelcomposer create-project laravel/laravelAPP_ENV=production, APP_DEBUG=false, php artisan optimizeEloquent, find()Blade with @extends
Symfonycomposer create-project symfony/skeleton, plus twig-bundle and orm-packAPP_ENV=prod, composer dump-env prod, cache:clearDoctrine ORM, repository find()Twig with {% extends %}
Slim 4slim/slim, slim/psr7, php-di/php-di, slim/twig-viewCompiled PHP-DI container, FastRoute cache, Twig cache, error details offPDO from the container (Slim has no database layer)Twig-View with {% extends %}
CodeIgniter 4composer create-project codeigniter4/appstarterCI_ENVIRONMENT=production, php spark optimize, each bench page served once at build time to fill the config cacheCodeIgniter Model, find(), SQLite3 driverView layouts with extend() and section(), esc()
Plain PHP, worker modeThe Plain PHP row's appNone; index.php required for each request in FrankenPHP's worker loopPDOPHP files with htmlspecialchars()
Taphra 1.0.0, worker modeThe Taphra 1.0.0 row's appSame as the php-fpm row; served from the skeleton's app/Static/frankenphp-worker.php, a new database connection per requestDataStore, findById().tpl.php view in a .lyt.php layout, e()
Symfony 8.1.12, worker modeThe Symfony row's appSame as the php-fpm row; the FrankenPHP worker runner of symfony/runtime, worker restart after 500 requestsDoctrine ORM, repository find()Twig with {% extends %}
Laravel 13.44.1, worker mode (Octane)The Laravel row's app plus laravel/octane 2.26.0Same as the php-fpm row, then OCTANE_SERVER=frankenphp and php artisan optimize; octane:frankenphp, worker reload after 500 requests, connections kept between requestsEloquent, find()Blade with @extends
CodeIgniter 4.7.6, worker modeThe CodeIgniter row's appSame as the php-fpm row, then php spark worker:install; config and file-locator caches off, as worker mode requires; reconnect before each requestCodeIgniter Model, find(), SQLite3 driverView layouts with extend() and section(), esc()

Every app's full source, its composer.lock and the raw output of every run are in the bench folder of the repository, so each number can be traced to a file. The stock skeletons were committed unchanged first, so the history shows exactly what was changed for the benchmark.

Run it yourself

You need Linux, Docker, bash, GNU tar and a machine with at least 8 CPUs that runs nothing else during the measurement. With the defaults a full run takes about an hour and a half and writes tables, every computed value and the raw output to bench/results/.

From the framework repository
bench/run.sh            # build, check every app's output, measure, report
bench/run.sh verify     # only start each app and check its output

Settings such as the frameworks, pages, number of runs, run length, connections and CPU pinning are environment variables; the harness README lists them.

What these numbers do not tell you

  • One machine. Client and server run on separate CPUs of one virtual machine and share its cache, memory bandwidth and kernel.
  • Latency at saturation. wrk keeps 32 connections busy, so requests queue for a free worker. This is not the latency of a lightly loaded server.
  • A small, cached database. The SQLite file sits in the page cache, so the database page measures the framework's database layer, not disk or network round trips.
  • No preloading, JIT or APCu for any framework, in either server setup.
  • Worker defaults differ. In worker mode each framework keeps its own defaults: some restart workers every 500 requests, some keep database connections open between requests. Tuning them would change the numbers.
  • No cold starts. Every run starts after a warm-up, so the first request after a deploy is not measured.
  • Not your app. Real pages do more work in your own code and database, and the framework's share of each request shrinks.