Lab runtime benchmark · PHP

What changes when you upgrade PHP 8.5.13 to 8.6.0, and what changes with JIT on?

  • Release notes: "Improve performance error position tracking during JSON decoding." - not visible on our machine
  • Default changed: ini:include_path is .: in 8.6.0, .:/usr/local/lib/php in 8.5.13
  • Default changed: ini:session.cookie_httponly is 1 in 8.6.0, 0 in 8.5.13
  • 2 more defaults differ between 8.5.13 and 8.6.0
  • Gone in 8.6.0, present in 8.5.13: extension:mbstring, ini:mbstring.detect_order, ini:mbstring.encoding_translation and 10 more
  • Mandelbrot set in plain PHP, JIT on against the default: 8.6.0 JIT on is 92.6% faster than 8.6.0
  • String building and splitting, JIT on against the default: 8.6.0 JIT on is 11.2% faster than 8.6.0

Settings differ: JIT off in 8.5.13 and 8.6.0; on in 8.6.0 JIT on.

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 the last value of each row with its first.

Every result: the median of each version and the change from 8.5.13 to 8.6.0 JIT on
Workload8.5.138.6.08.6.0 JIT onChange
Start-up0.17 ms ±1.4%0.19 ms ±11.2%— no clear difference
JSON encode and decode, 20,000 arrays69.3 ms ±5.3%69.6 ms ±1.5%— no clear difference
Regular expressions3.82 ms ±3.2%3.72 ms ±2.4%— no clear difference
SHA-256 of 32 MB15.5 ms ±3.5%15.3 ms ±3.2%— no clear difference
Sort 300,000 numbers48.8 ms ±1.5%50.1 ms ±2.3%— no clear difference
Array with 300,000 keys38.3 ms ±2.6%39.3 ms ±3.3%— no clear difference
String building and splitting32.2 ms ±2.4%33.6 ms ±4.2%— no clear difference
Mandelbrot set in plain PHP62.4 ms ±1.1%66.2 ms ±1.3%— no clear difference
Mandelbrot set in plain PHP, JIT on against the default—66.2 ms ±1.3%4.87 ms ±1.7% 92.6% faster
Array with 300,000 keys, JIT on against the default—39.3 ms ±3.3%36.1 ms ±2.6% no clear difference
String building and splitting, JIT on against the default—33.6 ms ±4.2%29.8 ms ±2.4% 11.2% faster

Defaults, 8.5.13 → 8.6.0

  • 267 compared
  • 4 changed
  • 1 new
  • 13 gone

ini directives at their built-in defaults and the extensions the image loads; 267 entries in both, 4 changed, 1 new, 13 gone.

Default8.5.138.6.0
ini:include_path.:/usr/local/lib/php.:
ini:session.cookie_httponly01
ini:session.cookie_samesite(empty)Lax
ini:session.use_strict_mode01

Gone in 8.6.0: extension:mbstring, 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:zend.signal_check.

New in 8.6.0: ini:error_include_args.

  • Improve performance error position tracking during JSON decoding. (release notes): not visible in our test

Measured Nov 23, 2026 on our own machine. How we tested · Raw data (JSON)

On this page · 8 sections
  1. Mandelbrot Set in Plain PHP Runs 92.6% Faster With JIT On
  2. String Building and Splitting Is 11.2% Faster With JIT On
  3. Upgrading to PHP 8.6.0 Shows No Clear Difference in Speed
  4. JSON Speed-Up in the Release Notes Did Not Show in Our Test
  5. Built-In Defaults Differ Between the Two Images
  6. Security Advisories Listed in the ChangeLog
  7. Release Notes Do Not Explain the JIT Speed-Ups in Our Test
  8. Sources

Security release

Status as of 2026-11-23

17 CVEs

PHP

Highest CVSS9.2Critical
First fixed in
8.2.36, 8.3.37, 8.4.28, 8.5.13The earliest release on each line that fixes these CVEs. The release to install is in the article's upgrade steps.
Exploited
None known · CISA SSVC
Published
2026-11-19

Most severe first

  1. CVE-2026-115560Critical9.2Session serializer mismatch can lead to remote code execution
  2. CVE-2026-126714Critical9.2Partially overwritten session files can lead to remote code execution
  3. CVE-2026-129182Critical9.2Use-after-free via repopulation of last_fatal_error_backtrace global after shutdown
  4. CVE-2026-129289Critical9.2PHP-FPM request smuggling through an unread HTTP request body
  5. CVE-2026-129474Critical9.2Use-after-free in magic method backtraces can lead to remote code execution
Show all 17 · 1 more named
  1. CVE-2026-129481Critical9.2Use-after-free after interrupted session shutdown
  2. CVE-2026-129496Critical9.2Timezone cache use-after-free can lead to remote code execution
  3. CVE-2026-129291High8.8PHP-FPM epoll use-after-free can lead to local privilege escalation
  4. CVE-2026-127960High8.7Denial of service through folded HTTP response headers
  5. CVE-2026-128064High8.2Mixed-case HTTPS and FTPS URLs can expose data in plaintext
  6. CVE-2026-128090High7.7PHAR OpenSSL signature bypass via algorithm downgrade
  7. CVE-2026-129538Medium6.9PHP-CGI out-of-bounds read and write during PATH_INFO correction
  8. CVE-2026-129438Medium6.3Incorrect RFC 3986 URI serialization for oversized input
  9. CVE-2026-129501Medium6.3Double free during DOM XML serialization
  10. CVE-2026-129506Medium6.3SOAP use-after-free when processing DTD entity references
  11. CVE-2026-15353Medium6.3SOAP information disclosure through malformed array dimensions
  12. CVE-2026-129292Medium5.3PHP-FPM status endpoint XSS via unescaped user and script fields

Also named in this article, without a record here: CVE-2026-48841

Data: CVE records on cve.org

Check your project

TL;DR

In our test, the Mandelbrot kernel ran 92.6% faster with JIT on in PHP 8.6.0 than with JIT off. The result concerns PHP CLI scripts whose time goes into CPU-bound loops of this kind. The plain upgrade from 8.5.13 to 8.6.0 showed no clear difference in speed.

Mandelbrot Set in Plain PHP Runs 92.6% Faster With JIT On #

We measured 66.2 ms (spread ±1.3%) for the Mandelbrot set on 8.6.0 with JIT off, and 4.87 ms (spread ±1.7%) with JIT on. LAB DATA marks this pair as 92.6% faster, with lower time as the better result. This is the largest JIT gain in our run.

The practical reading is narrow. The kernel is a plain PHP loop with arithmetic, so the result says something about code of that shape. Teams that run numeric CLI jobs of this kind have the strongest reason to test the JIT setting first.

String Building and Splitting Is 11.2% Faster With JIT On #

String building and splitting measured 33.6 ms (spread ±4.2%) on 8.6.0 with JIT off and 29.8 ms (spread ±2.4%) with JIT on, which LAB DATA marks as 11.2% faster. The gain is smaller than the Mandelbrot result, and the spreads of both runs are wider than those of the Mandelbrot runs.

The same kernel did not separate the two PHP versions without the JIT. On 8.5.13 it measured 32.2 ms (spread ±2.4%), and LAB DATA marks the 8.5.13 and 8.6.0 pair as no clear difference. So for this kernel, the measured gain comes from the JIT setting, not from the upgrade.

Upgrading to PHP 8.6.0 Shows No Clear Difference in Speed #

PHP 8.6.0 was announced on 19 Nov 2026, and the announcement says that PHP 8.6.0 Released! makes it available for immediate download. In our test, the 8.5.13 and 8.6.0 images showed no clear difference on start-up, JSON, regular expressions, SHA-256, sorting, the array with 300,000 keys, string building and the Mandelbrot kernel. The Mandelbrot kernel measured 62.4 ms (spread ±1.1%) on 8.5.13 and 66.2 ms (spread ±1.3%) on 8.6.0, which LAB DATA still marks as no clear difference.

As a control, we ran 8.5.13 against 8.5.13 in two containers, and the largest difference was 2.2%, with none clear. So an upgrade on its own is not a speed change in these kernels. Any speed decision should rest on the JIT comparisons above, not on the version number.

JSON Speed-Up in the Release Notes Did Not Show in Our Test #

The release notes list "Improve performance error position tracking during JSON decoding" in the PHP 8 ChangeLog for 8.6.0. In our test, JSON encode and decode of 20,000 arrays took 69.3 ms (spread ±5.3%) on 8.5.13 and 69.6 ms (spread ±1.5%) on 8.6.0, which LAB DATA marks as no clear difference.

Our test did not show this promise. Anyone who depends on faster JSON decoding after the upgrade should not expect it from the workload measured here.

Built-In Defaults Differ Between the Two Images #

Our test compared 267 built-in ini directives and extensions. It found 4 changed, 1 added and 13 removed. The changed and added values, as measured on the two images, are these:

Config
# 8.5.13 → 8.6.0 (our test, built-in defaults)
include_path = .:/usr/local/lib/php → .:
session.cookie_httponly = 0 → 1
session.cookie_samesite = "" → Lax
session.use_strict_mode = 0 → 1
error_include_args = 0 (added in 8.6.0)

The session values match the release notes, which say that the PHP 8 ChangeLog lists "session.use_strict_mode (now 1), session.cookie_httponly (now 1) and session.cookie_samesite (now "Lax")" as changed defaults. The same notes add the error_include_args option. Applications that depend on the 8.5.13 session values should review those three directives before moving to 8.6.0.

Our test also found 13 items present on 8.5.13 and absent from the 8.6.0 image: the mbstring extension, 11 mbstring ini directives and zend.signal_check. The mbstring extension was not loaded in the tested 8.6.0 image, but the PHP 8 ChangeLog documents no removal of it; the same list still names mbstring changes, such as "mbregex has been deprecated." The cause of the difference is unknown to us, and it may lie in how the tested image is built.

Security Advisories Listed in the ChangeLog #

The PHP 8 ChangeLog for 8.6.0 lists the advisories below, several of which can lead to remote code execution. Each row pairs a CVE with its GHSA identifier as the ChangeLog prints them, except the last row, which has only a CVE. The table is taken from the release notes.

AdvisoryWhat the ChangeLog says it fixes
CVE-2026-129474 / GHSA-8mjj-2r7p-4hg2Use-after-free in magic method backtraces can lead to remote code execution.
CVE-2026-129182 / GHSA-2fjv-p558-g82mUse-after-free via repopulation of the last_fatal_error_backtrace global after shutdown.
CVE-2026-129538 / GHSA-5j3f-64r7-f564PHP-CGI out-of-bounds read and write during PATH_INFO correction (CGI).
CVE-2026-129496 / GHSA-gr4f-wgx5-jpfvTimezone cache use-after-free can lead to remote code execution.
CVE-2026-129501 / GHSA-x8r7-mg3g-74hgDouble free during DOM XML serialization.
CVE-2026-129291 / GHSA-jm4m-qfqx-967mPHP-FPM epoll use-after-free can lead to local privilege escalation.
CVE-2026-129289 / GHSA-qc49-hpvq-g2w6PHP-FPM request smuggling through an unread HTTP request body.
CVE-2026-129292 / GHSA-3mg3-cr28-46gcPHP-FPM status endpoint XSS via unescaped user and script fields.
CVE-2026-128090 / GHSA-68fq-fh7h-f8grPHAR OpenSSL signature bypass via algorithm downgrade.
CVE-2026-127960 / GHSA-mmf9-xm3v-hg2xDenial of service through folded HTTP response headers.
CVE-2026-128064 / GHSA-f6gg-rchx-xw8jMixed-case HTTPS and FTPS URLs can expose data in plaintext.
CVE-2026-126714 / GHSA-fm2m-fjf5-v3cpPartially overwritten session files can lead to remote code execution.
CVE-2026-115560 / GHSA-658j-r8rw-q6mxSession serializer mismatch can lead to remote code execution.
CVE-2026-129481 / GHSA-g3vh-838c-65v7Use-after-free after interrupted session shutdown.
CVE-2026-15353 / GHSA-q23r-hr55-xmpgSOAP information disclosure through malformed array dimensions.
CVE-2026-129506 / GHSA-4646-p932-gw34SOAP use-after-free when processing DTD entity references.
CVE-2026-129438 / GHSA-mg3p-mxj9-g2mmIncorrect RFC 3986 URI serialization for oversized input.
CVE-2026-48841Listed with the URI upgrade to uriparser 1.0.3.

Release Notes Do Not Explain the JIT Speed-Ups in Our Test #

The release notes contain many JIT fixes, for example "Fixed bug GH-24436 (Tracing JIT: keep the SEND_VAL type guard after assigning to a reference)" in the PHP 8 ChangeLog. Our test shows the gains on the Mandelbrot and string kernels, and the release notes do not mention them, so we offer no cause.

The Sentinel’s Call

If you are moving to PHP 8.6.0 for speed alone, our test does not support that, because the upgrade showed no clear difference on any kernel. Check the session defaults first, since they differ between the two images we tested. Check whether mbstring is loaded in your own 8.6.0 build, because the tested 8.6.0 image did not load it. Test JIT on only for workloads that resemble the Mandelbrot and string kernels, the two where it measured faster; the rest can wait.

Our judgement, drawn only from the facts and sources above.

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.5.13 php:8.5.13-cli sha256:f324fcb4dc00…
  • 8.6.0 php:8.6.0-cli sha256:d84acf3155d9…
  • 8.6.0 JIT on php:8.6.0-cli sha256:d84acf3155d9…

Self-test 8.5.13 against 8.5.13 in two containers: the largest difference was 2.2%, none of them clear.

Method

  • Median of 11 rounds after 1 warm-up round; the version that starts each round rotates
  • 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
  • JIT on: OPcache for the CLI with the tracing JIT and a 64 MB buffer, set by php's own -d flags; the script reports JIT on only after the JIT has compiled code
  • JIT as each version runs it: off on 8.5.13, off on 8.6.0, on on 8.6.0 JIT on
Reproduce it
Commands
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 8.6.0 JIT on add -d opcache.enable_cli=1 -d opcache.jit=tracing -d opcache.jit_buffer_size=64M -d opcache.file_update_protection=0 right after php.
For 8.5.13 use 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 line

Limits

  • 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.

Raw data (JSON) · How we test · Every PHP line we measured

Sources

  1. PHP 8.6.0 Released! — PHP php.net · Nov 19, 2026
  2. Version 8.6.0 — PHP: PHP 8 ChangeLog php.net · Nov 19, 2026

Also consulted

Next reading

Edited and approved by Jarosław Krzemiński. Spotted a mistake? Report a correction or read the corrections policy.