PHP 8.3 vs 8.4 vs 8.5: Full Performance Comparison (2026 Update)

PHP 8.5 was released in late 2025. Six months later, developers are still asking the same question: “Is it worth upgrading?” To answer this, we benchmarked PHP 8.3.30, 8.4.17, and 8.5.2 under three realistic workloads—light I/O, moderate I/O latency (50ms), and heavy I/O latency (200ms). The results reveal clear patterns, a surprising reversal, and a practical answer to the upgrade question.

We tested all three versions on identical hardware with uniform PHP configuration. The data shows that PHP 8.5 delivers up to 14.4% better throughput than 8.4 in light I/O workloads, but the advantage completely disappears when database latency exceeds 200ms. We also uncovered an unexpected finding: PHP 8.4 is actually slower than 8.3 in light I/O scenarios—a regression that has been observed in previous PHP versions and warrants attention.

This article provides the full methodology, raw data, and a practical upgrade decision matrix based on your workload type.


Why Version Comparisons Still Matter in 2026

The PHP 8.x series has been a story of incremental improvements. Unlike the jump from PHP 5.x to 7.0—which delivered a 2x performance boost—the 8.x releases have focused on feature additions, JIT maturation, and gradual engine optimizations. This means the decision to upgrade is no longer a no-brainer; it depends on your specific workload.

Our previous benchmarks have established that:

  • JIT provides massive gains in CPU-bound workloads (+61% to +95%)
  • JIT provides zero benefit in I/O-bound workloads (0% to -8%)
  • The application server you choose matters far more than the PHP version

This article completes the picture by asking: all else being equal, does PHP 8.5 execute your code faster than 8.4 or 8.3?


Test Environment & Methodology

All tests ran on a single Alibaba Cloud ECS instance to eliminate network variance. The software stack mirrors a typical production environment managed by the Baota panel—the most popular server management tool in the PHP hosting world.

Server Specifications

  • OS: Ubuntu 24.04 LTS
  • Web Server: Nginx 1.28
  • PHP Versions: 8.3.30, 8.4.17, 8.5.2
  • Database: MySQL 8.4 (used only for I/O tests)
  • Control Panel: Baota

Uniform PHP Configuration

All three versions shared identical php.ini settings to ensure a fair comparison:

DirectiveValue
memory_limit256M
opcache.enableOn
opcache.validate_timestampsOff
opcache.memory_consumption512
opcache.jitOff
opcache.jit_buffer_size0

JIT was disabled across all versions to isolate engine-level performance improvements from JIT compiler effects. For JIT-specific comparisons, see our JIT configuration impact analysis.

Test Script

Each version ran an identical PHP script performing 1,000 sqrt() calculations (light CPU pressure) followed by a database query with a controlled delay:

RouteDatabase QueryI/O Delay
index.php (Light I/O)SELECT 1 as ok<1ms
index.php?/bench-slowSELECT SLEEP(0.05) as ok50ms
index.php?/bench-xslowSELECT SLEEP(0.2) as ok200ms

The script was deployed as a single index.php file to eliminate framework overhead and focus purely on PHP engine performance. Each version ran in its own isolated Nginx virtual host on a dedicated port (8083, 8084, 8085).

Load Testing Tool & Parameters

  • Tool: ApacheBench (ab) 2.3
  • Concurrency: 100 (-c 100)
  • Duration: 60 seconds per run (-t 60)
  • Strategy: Each version ran 3 consecutive rounds with a 10-second warm‑up before each measurement. The first round was discarded; the final result is the average of rounds 2 and 3.

Benchmark Results

Light I/O Scenario (Sub-Millisecond Database)

This scenario represents the most common workload: fast queries, minimal I/O wait.

PHP VersionAvg RPSP99 Latencyvs 8.3vs 8.4
8.3.303162.452ms——
8.4.172999.556ms-5.2%—
8.5.23430.046ms+8.5%+14.4%

PHP 8.5 leads decisively in light I/O workloads, delivering 8.5% more throughput than 8.3 and 14.4% more than 8.4. Remarkably, PHP 8.5 also achieved the lowest P99 latency (46ms vs 52-56ms), indicating better tail latency consistency.

PHP 8.4 is slower than 8.3. This is the most surprising finding in our dataset. PHP 8.4’s RPS of 2999.5 represents a 5.2% regression from 8.3. While concerning, this is not unprecedented—PHP 7.3 initially showed similar regressions from 7.2 before patch releases stabilized performance.

Moderate I/O Scenario (50ms Database Latency)

This scenario simulates a typical slow query or external API call.

PHP VersionAvg RPSP99 Latencyvs 8.3vs 8.4
8.3.30386.4268ms——
8.4.17387.0266ms+0.2%—
8.5.2386.9267ms+0.1%0.0%

All three versions perform identically. With a 50ms I/O wait dominating the request lifecycle, the CPU-side differences between PHP versions become invisible. The theoretical maximum for 20 processes each handling a 50ms blocking request is 400 RPS—all three versions operate at approximately 97% of this ceiling.

Heavy I/O Scenario (200ms Database Latency)

This scenario represents a very slow database query or an unoptimized external service call.

PHP VersionAvg RPSP99 Latencyvs 8.3vs 8.4
8.3.3098.51017ms——
8.4.1798.61014ms+0.1%—
8.5.298.61013ms+0.1%0.0%

Version differences completely disappear. At 200ms I/O latency, all three versions converge to the theoretical maximum of 100 RPS (20 processes / 0.2 seconds = 100 RPS). The PHP engine’s execution speed is irrelevant when the bottleneck is entirely in the database layer.


The Complete Picture: CPU Gains vs I/O Reality

Combining the light I/O data with our earlier I/O latency benchmark , we can now plot the complete performance decay curve for each PHP version as I/O latency increases:

I/O LatencyPHP 8.3 RPSPHP 8.4 RPSPHP 8.5 RPSWinner
<1ms (Light)3162.42999.53430.08.5 (+14.4% vs 8.4)
50ms386.4387.0386.9All tied
200ms98.598.698.6All tied

The pattern is clear and consistent with our previous findings about JIT: PHP engine optimizations only matter when the CPU is the bottleneck. Once I/O latency reaches even modest levels (50ms+), the database wait time so completely dominates the request lifecycle that PHP version differences become irrelevant.


The PHP 8.4 Anomaly: Regression or Measurement Error?

The 5.2% performance regression from PHP 8.3 to 8.4 in light I/O workloads deserves special attention. We re-ran this specific test multiple times to confirm the result, and the pattern held consistently.

This is not the first time a PHP minor version has shown a performance regression. PHP 7.3 initially benchmarked slower than 7.2 in some scenarios due to changes in the OPcache internals and memory management. Those regressions were largely resolved by the time 7.3 reached its final patch release.

For PHP 8.4 users, this data suggests that upgrading directly to 8.5 (skipping 8.4) is the optimal path. If you are already on 8.4, the 14.4% improvement from upgrading to 8.5 is a compelling reason to make the jump.


The Upgrade Decision Matrix

Based on the complete picture now available from our comprehensive PHP version testing series, here is the ultimate upgrade guide:

Your Current VersionYour WorkloadRecommended ActionExpected Benefit
PHP 8.3CPU-heavyUpgrade to 8.5+8.5% RPS
PHP 8.3I/O-heavyOptional~0% (but get 8.5 features)
PHP 8.4CPU-heavyUpgrade to 8.5+14.4% RPS
PHP 8.4I/O-heavyOptional~0% (but fix potential regression)
PHP 7.4AnyUrgently upgrade to 8.5+100%+ (Engine improvements + security)

Additional Factors to Consider

FactorImpact on Decision
JIT requirementsIf CPU-bound, JIT adds 61-95% on top of engine gains
Application serverRoadRunner or Swoole will amplify any PHP version gains
Containerized deploymentFrankenPHP bundles PHP 8.5.6, so upgrading is automatic
Security patchesPHP 8.3 enters security-only mode in late 2026

Full Reproducibility

At PHPBenchLab, we believe benchmarks should be transparent and repeatable. Below are the exact configurations used in this test.

Test Endpoints (Publicly Accessible)

  • PHP 8.3: https://phpbenchlab.com:8083/index.php
  • PHP 8.4: https://phpbenchlab.com:8084/index.php
  • PHP 8.5: https://phpbenchlab.com:8085/index.php

Uniform PHP Configuration (All Versions)

ini

memory_limit = 256M
opcache.enable = 1
opcache.validate_timestamps = 0
opcache.memory_consumption = 512
opcache.jit = off
opcache.jit_buffer_size = 0

FPM Pool Configuration (All Versions)

text

pm = static
pm.max_children = 20
pm.max_requests = 0

Benchmark Command (After Warm‑Up)

bash

ab -c 100 -t 60 http://127.0.0.1:8085/index.php

Frequently Asked Questions

1. Why is PHP 8.4 slower than 8.3 in light I/O workloads?

This is a confirmed regression of approximately 5.2%. Similar regressions have occurred in previous PHP minor versions (notably 7.3) and are typically related to changes in OPcache internals or memory management. Users on PHP 8.4 should consider upgrading directly to 8.5, which not only fixes this regression but delivers a net 14.4% improvement over 8.4.

2. Should I upgrade from PHP 8.3 to 8.5?

If your application is CPU-bound or handles significant traffic with fast queries, the 8.5% throughput improvement justifies the upgrade. If your application is I/O-bound (slow databases, external APIs), the performance benefit is negligible, but the new language features and security support still make upgrading worthwhile.

3. Why do all three versions perform identically under I/O latency?

When a PHP process spends 200ms waiting for the database, the CPU is idle for 199+ of those milliseconds. The PHP engine’s execution speed—whether 5% faster or slower—is dwarfed by the I/O wait. At that point, the only way to improve throughput is to add more PHP processes (or use a coroutine-based runtime like Swoole).

4. Does JIT change the version comparison?

Yes. With JIT enabled, the performance gaps between versions widen significantly in CPU-bound workloads. However, in I/O-bound workloads, JIT provides zero benefit regardless of PHP version. For a complete JIT analysis, see our JIT I/O latency benchmark .


What’s Next?

This test completes our comprehensive PHP version comparison series. In future articles, we plan to explore:

  • PHP 8.5 JIT impact across the three versions: Does JIT benefit 8.5 more than 8.3?
  • Application server × PHP version matrix: Which combination of runtime and PHP version delivers the best performance?
  • PHP 8.6 preview benchmark: Early performance testing of the upcoming PHP 8.6 release.

Have a specific scenario you would like us to benchmark? Reach out via our contact page.

Found this article useful? Share it with your team or bookmark PHPBenchLab.com for more data‑driven PHP performance insights.

Leave a Comment