# Seven PHP frameworks, four measurements

> Cold request, load test, OPcache preload and the Laravel preload curve: the measured cost of seven PHP frameworks on a single page.

- Kind: Infographic
- Published: 2026-10-03
- Based on these articles: https://muhammetsafak.com/research/php-framework-load-test/ · https://muhammetsafak.com/research/php-framework-footprint/ · https://muhammetsafak.com/research/opcache-preload-deploy-bill/ · https://muhammetsafak.com/research/laravel-preload-curve/
- Source: https://muhammetsafak.com/visuals/i/php-framework-measurements/
- Language: en-US
- Author: Muhammet Şafak

---
## Panel 1

4.4×

Empty route, req/s

gap between the fastest and the slowest

Slim 25,975, Laravel 5,966 req/s. Once the database joins in, the gap shrinks to 3.7×.

## Files loaded per request

Footprint

files

-   Phalcon 7
-   Yii2 62
-   Slim 79
-   CodeIgniter 96
-   Symfony 224
-   Laminas 269
-   Laravel 359

[Source: PHP framework footprint measurement](https://muhammetsafak.com/research/php-framework-footprint/)

## Cold first request

Footprint

ms

-   Phalcon 2.2
-   Slim 7.9
-   Yii2 17.4
-   CodeIgniter 22.2
-   Laminas 27.7
-   Symfony 35.7
-   Laravel 72.2

[Source: PHP framework footprint measurement](https://muhammetsafak.com/research/php-framework-footprint/)

## Throughput on an empty route

Load test

req/s

-   Slim 25,975
-   Yii2 19,834
-   Phalcon 15,021
-   Symfony 13,067
-   Laminas 8,349
-   CodeIgniter 6,431
-   Laravel 5,966

PHP 8.4.24, JIT off, nginx + php-fpm with 8 workers, 64 connections, 15 s. Docker Desktop, Apple M4 Pro.

## Req/s by scenario

Load test

Requests per second for seven frameworks in the empty route, template, single-row and 20-row database scenarios

| Framework | Empty route | Template | DB single row | DB 20 rows |
| --- | --- | --- | --- | --- |
| Slim | 25,975 | 22,780 | 14,443 | 4,551 |
| Yii2 | 19,834 | 16,995 | 9,366 | 3,245 |
| Phalcon | 15,021 | 10,563 | 5,222 | 2,040 |
| Symfony | 13,067 | 9,355 | 6,972 | 3,060 |
| Laminas | 8,349 | 7,419 | 5,421 | 2,874 |
| CodeIgniter | 6,431 | 5,557 | 4,527 | 2,494 |
| Laravel | 5,966 | 5,290 | 3,887 | 1,293 |

## The gap narrows as work is added

Load test

-   3.7× Gap at a single DB row 4.4× on an empty route, 3.5× at 20 rows
-   1.3× Phalcon / Laravel At a single DB row, versus 2.5× on an empty route
-   0-7% Cost of routing Loss compared to an empty route
-   1-8% Cost of middleware When a five-layer chain is added

## Latency on a JSON response

Load test

p50, p95 and p99 latencies of seven frameworks in the JSON scenario, in milliseconds

| Framework | p50 | p95 | p99 |
| --- | --- | --- | --- |
| Slim | 0.25 ms | 0.43 ms | 0.53 ms |
| Yii2 | 0.35 ms | 0.59 ms | 0.73 ms |
| Phalcon | 0.46 ms | 0.73 ms | 0.94 ms |
| Symfony | 0.58 ms | 0.89 ms | 0.96 ms |
| Laminas | 0.88 ms | 1.52 ms | 2.23 ms |
| CodeIgniter | 1.16 ms | 1.84 ms | 1.98 ms |
| Laravel | 0.75 ms | 1.97 ms | 2.59 ms |

## Panel 8

−63%

Laravel

throughput taken by the default web group

Choosing a framework can open a gap of up to 4×, but a single default middleware group can take away 63%.

## Web group on and off

Laravel

Req/s, p50 and p99 of a Laravel route without a middleware group and with the default web group

| Route | Req/s | p50 | p99 |
| --- | --- | --- | --- |
| No group | 5,858 | 1.32 ms | 2.88 ms |
| Default web group | 2,176 | 1.73 ms | 71.89 ms |

## Cold request: before and after preload

OPcache preload

Cold request time for seven frameworks without preload and with the best preload, plus the gain and the php-fpm readiness cost

| Framework | No preload | Best preload | Gain | fpm cost |
| --- | --- | --- | --- | --- |
| Laravel | 76.31 ms | 13.98 ms | 5.5× | +2,340 ms |
| Symfony | 35.58 ms | 2.50 ms | 14.2× | −40 ms |
| Laminas | 26.70 ms | 3.81 ms | 7.0× | −7 ms |
| CodeIgniter | 20.75 ms | 3.13 ms | 6.6× | −12 ms |
| Yii2 | 16.98 ms | 4.80 ms | 3.5× | +13 ms |
| Slim | 7.46 ms | 1.86 ms | 4.0× | +28 ms |
| Phalcon | 2.68 ms | 1.99 ms | 1.3× | +43 ms |

## Preload is not a setting, it is a maintenance job

OPcache preload

-   2/7 Official preload file Only in Symfony and CodeIgniter
-   14.2× Symfony's gain From 35.58 ms to 2.50 ms
-   2.3 s Laravel's deploy cost In return for a 62 ms gain per visitor
-   1.3× Phalcon Negative control: 3 files

## Cold request as more files are preloaded

Laravel preload curve

cold request, ms

Cold request as more files are preloaded (cold request, ms): 0 files: 68.37, 1,592 files: 38.01, 2,686 files: 28.48, 2,809 files: 12.77, 4,721 files: 10.96.

Median values; the filters are specific to this application.

## The sweet spot is at 2,809 files

Laravel preload curve

-   12.77 ms Cold request at the sweet spot −81% compared to 68.37 ms without preload
-   +1,132 ms fpm readiness cost From 382 ms to 1,514 ms
-   15.7 ms Gain from the critical 123 files Eight times what the 1,912 files deliver
-   1.8 ms Gain from the last 1,912 files 654 ms of cost per millisecond gained

## The limits of these numbers

As you read

-   **Environment** The load test ran in a Docker Desktop VM; absolute values do not represent bare metal, and the fast candidates are, if anything, under-reported.
-   **Scope** JIT was off, worker mode was not measured. Slim has no data layer or template engine of its own.
-   **Cold** Cold means an empty OPcache. A single shot strays from the median: Symfony takes 76.5 ms in a single shot, against a median of 35.58 ms.
-   **Consistency** Zero non-200 responses across 546 load measurements; in 150 samples the worst value is 84% of the best.
