Lab Tracker · runtime benchmark
PHP performance by version: 8.2 to 8.6, benchmarked
5 versions of PHP, from 8.2 to 8.6, measured on the same machine with the same script in one run, so every version meets the same conditions.
- Last run Nov 23, 2026
- Versions 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0
- Setup one machine, one script
- 80.7% fasterSHA-256 of 32 MB80.3 ms → 15.5 ms · 8.2.36 → 8.6.0
- 14.4% slowerJSON encode and decode, 20,000 arrays61.4 ms → 70.3 ms · 8.2.36 → 8.6.0
- 6 of 8workloads with no clear differencea change counts at 10% or more, twice the spread
- 7%largest self-test differencethe same version twice in one run, none of them clear
Every workload, every version
Median of the rounds, ± the spread between them. Green and amber cells differ by 10% or more from the first value of a row with a clear change; the last column compares 8.6.0 with 8.2.36.
| Workload | 8.2.36 | 8.3.37 | 8.4.28 | 8.5.13 | 8.6.0 | 8.2.36 → 8.6.0 |
|---|---|---|---|---|---|---|
| Start-up | 0.18 ms ±11.5% | 0.18 ms ±11.2% | 0.18 ms ±2.0% | 0.21 ms ±41.5% | 0.20 ms ±15.7% | no clear difference |
| JSON encode and decode, 20,000 arrays | 61.4 ms ±5.6% | 65.8 ms ±2.0% | 66.6 ms ±1.2% | 70.3 ms ±2.1% | 70.3 ms ±2.9% | 14.4% slower |
| Regular expressions | 3.91 ms ±4.1% | 3.91 ms ±3.1% | 3.84 ms ±3.6% | 3.82 ms ±4.4% | 3.87 ms ±4.7% | no clear difference |
| SHA-256 of 32 MB | 80.3 ms ±2.1% | 79.9 ms ±1.4% | 15.4 ms ±3.6% | 15.3 ms ±4.1% | 15.5 ms ±5.4% | 80.7% faster |
| Sort 300,000 numbers | 54.5 ms ±3.1% | 49.9 ms ±2.4% | 50.5 ms ±1.1% | 51.0 ms ±2.7% | 50.3 ms ±2.9% | no clear difference |
| Array with 300,000 keys | 39.1 ms ±3.0% | 38.2 ms ±2.0% | 39.4 ms ±5.3% | 39.4 ms ±2.0% | 39.8 ms ±2.5% | no clear difference |
| String building and splitting | 33.0 ms ±1.5% | 33.8 ms ±3.0% | 34.0 ms ±1.8% | 32.7 ms ±2.8% | 33.1 ms ±2.3% | no clear difference |
| Mandelbrot set in plain PHP | 69.0 ms ±1.7% | 64.7 ms ±2.0% | 66.6 ms ±1.4% | 62.0 ms ±0.8% | 66.2 ms ±2.0% | no clear difference |
Defaults, 8.2.36 → 8.6.0
- 256 compared
- 8 changed
- 12 new
- 15 gone
ini directives at their built-in defaults and the extensions the image loads; 256 entries in both, 8 changed, 12 new, 15 gone.
| Default | 8.2.36 | 8.6.0 |
|---|---|---|
ini:include_path | .:/usr/local/lib/php | .: |
ini:opcache.jit | tracing | disable |
ini:opcache.jit_buffer_size | 0 | 64M |
ini:opcache.jit_hot_loop | 64 | 61 |
ini:register_argc_argv | 1 | 0 |
ini:session.cookie_httponly | 0 | 1 |
ini:session.cookie_samesite | (empty) | Lax |
ini:session.use_strict_mode | 0 | 1 |
Gone in 8.6.0: extension:mbstring, ini:disable_classes, ini:mbstring.detect_order, ini:mbstring.encoding_translation, ini:mbstring.http_input, ini:mbstring.http_output, ini:mbstring.http_output_conv_mimetypes, ini:mbstring.internal_encoding, ini:mbstring.language, ini:mbstring.regex_retry_limit, ini:mbstring.regex_stack_limit, ini:mbstring.strict_detection, ini:mbstring.substitute_character, ini:opcache.consistency_checks, ini:zend.signal_check.
New in 8.6.0: extension:lexbor, extension:uri, ini:error_include_args, ini:fatal_error_backtraces, ini:mail.cr_lf_mode, ini:max_memory_limit, ini:opcache.file_cache_read_only, ini:opcache.jit_max_trace_length, ini:openssl.libctx, ini:session.cookie_partitioned, ini:zend.max_allowed_stack_size, ini:zend.reserved_stack_size.
Measured Nov 23, 2026 on our own machine. How we tested · Raw data (JSON)
More on PHP
How we tested
- ProcessorAMD Ryzen 7 7800X3D (8 cores, 16 threads)
- Memory32 GB RAM
- SystemWindows 11 Pro, Docker Desktop (WSL 2)
- ContainersDocker Engine 29.9.3
What we ran
- 8.2.36
php:8.2.36-clisha256:1d8c35f82a26… - 8.3.37
php:8.3.37-clisha256:9e2a4e9b1704… - 8.4.28
php:8.4.28-clisha256:6b13a8678b38… - 8.5.13
php:8.5.13-clisha256:f324fcb4dc00… - 8.6.0
php:8.6.0-clisha256:d84acf3155d9…
Self-test 8.6.0 against 8.6.0 in two containers: the largest difference was 7.0%, none of them clear.
Method
- Median of 11 rounds after 1 warm-up round; the version that starts each round rotates
- Each version is the newest release of its line on 2026-11-23, run as it ships, all in one run
- JIT as each version runs it: off on 8.2.36, off on 8.3.37, off on 8.4.28, off on 8.5.13, off on 8.6.0
- One process per round in each container: one warm-up call, then one timed call per workload
- Small single-threaded kernels without OPcache, as the CLI runs them by default; nothing is read from or written to disk
Reproduce it
cat php-core.php | docker run --rm -i --network none --read-only --user 10001:10001 --tmpfs /tmp:exec php:8.6.0-cli php
For the other versions use php:8.2.36-cli, php:8.3.37-cli, php:8.4.28-cli, php:8.5.13-cli.
The script: https://thestacksentinel.com/lab/scripts/php-core.php.txt (save it as php-core.php)
Defaults: the same command with https://thestacksentinel.com/lab/scripts/php-defaults.php.txt prints every DEFAULT lineLimits
- One machine: an 8-core desktop CPU under Windows 11 and WSL 2; a Linux server may behave differently.
- Small kernels, not an application: real sites spend their time in I/O, frameworks and OPcache-warmed code.