Introduction
PHP 8.5 was released in late 2025, bringing significant performance improvements, JIT compilation, and new language features. But if you’re still on PHP 7.4 or 8.0, you might be wondering: is it worth upgrading?
In this guide, we compile data from six real-world benchmarks to give you a complete picture of PHP performance from 7.4 to 8.5. You’ll learn:
- How much faster each version is
- Whether JIT actually helps
- Real-world performance in WordPress, Laravel, and Symfony
- How PHP compares to Node.js and Go
- A step-by-step upgrade checklist
All data is reproducible — scripts and methodology are included in our benchmark series.
Test Environment
All benchmarks in this guide were conducted on a dedicated test server with the following specifications:
| Component | Specification |
|---|---|
| CPU | Intel Xeon Platinum (4 vCores) |
| RAM | 8 GB ECC |
| OS | Ubuntu 24.04 LTS |
| Web Server | Nginx 1.24 |
| PHP-FPM | Static processes, pm.max_children = 100 |
| OPcache | Enabled |
| Test Tool | Apache Bench (ab) |
| Concurrency | 1 (single request at a time) |
| Requests per Run | 1,000 |
| Warm‑up | 500 requests before each run |
PHP Version Performance Evolution
We tested PHP 7.4 through 8.5 with a CPU‑intensive script (recursive Fibonacci + 1M loop). Here are the results with OPcache enabled on all versions:
| PHP Version | Avg Requests/sec | Improvement vs 7.4 |
|---|---|---|
| PHP 7.4.33 | 1.81 | – |
| PHP 8.0.26 | 1.83 | +1.1% |
| PHP 8.1.32 | 1.85 | +2.2% |
| PHP 8.2.28 | 1.84 | +1.7% |
| PHP 8.5.2 | 1.86 | +2.8% |
Key takeaway: The cumulative performance gain from PHP 7.4 to 8.5 is 2.8% in CPU‑intensive tasks. While modest, this gain comes without any code changes — just an upgrade.
For detailed methodology and raw data, see our PHP 7.4 to 8.5 performance evolution benchmark.
JIT: The Game Changer
JIT (Just‑In‑Time compilation) is the most significant performance feature in PHP 8. We tested PHP 8.5 with JIT on vs off using the same CPU‑intensive script:
| Configuration | Avg Requests/sec | Improvement |
|---|---|---|
| JIT disabled | 14.33 | baseline |
| JIT enabled | 23.07 | +61% |
Key takeaway: JIT delivers a 61% performance boost on CPU‑heavy tasks. For applications with significant computation (data processing, complex calculations), enabling JIT is a must.
For complete JIT benchmark data and configuration details, see our PHP 8.5 JIT benchmark.
Real‑World Applications
CPU tests are useful, but what about real applications like WordPress and Laravel?
WordPress Homepage (I/O‑bound)
| Configuration | Avg Requests/sec | Improvement |
|---|---|---|
| JIT disabled | 8.99 | – |
| JIT enabled | 9.04 | +0.6% |
WordPress is I/O‑bound — most time is spent waiting for database queries. JIT offers minimal gains. See our WordPress PHP performance benchmark for full details.
Laravel CPU Route (Compute‑intensive)
| Configuration | Avg Requests/sec | Improvement |
|---|---|---|
| JIT disabled | 21.22 | – |
| JIT enabled | 38.60 | +82% |
Laravel shows dramatic gains with JIT, nearly doubling throughput.
Symfony CPU Route (Compute‑intensive)
| Configuration | Avg Requests/sec | Improvement |
|---|---|---|
| JIT disabled | 21.60 | – |
| JIT enabled | 42.04 | +95% |
Symfony shows even larger gains, with throughput nearly doubling.
For complete framework benchmarks, see our JIT in real-world frameworks.
Key takeaway: JIT’s impact depends entirely on your workload:
- I/O‑bound apps (WordPress frontend) → <5% gain
- CPU‑bound apps (Laravel/Symfony API routes) → 80-95% gain
How PHP Compares to Other Languages
We benchmarked PHP 8.5 (JIT on) against Node.js 22, Go 1.23, and Python 3.12 on the same CPU‑intensive task:
| Language | Avg Requests/sec | Relative to PHP |
|---|---|---|
| Go 1.23 | 67.15 | 2.91x |
| Node.js 22 | 37.83 | 1.64x |
| PHP 8.5 (JIT on) | 23.07 | 1.00x |
| Python 3.12 | 4.72 | 0.20x |
Key takeaway: PHP 8.5 with JIT achieves 61% of Node.js performance and is 4.9x faster than Python. The old reputation of PHP being “slow” no longer holds.
For full cross-language benchmark details, see our PHP vs Node.js vs Go vs Python benchmark.
Upgrade Checklist
Step 1: Check Compatibility
Before upgrading, test your application on PHP 8.5 in a staging environment. Common issues:
- Deprecated functions removed
mysql_*functions removed- JSON extension now required
- Some extensions may need updates
Step 2: Enable OPcache
Add to your php.ini:
ini
opcache.enable = 1
opcache.memory_consumption = 128
opcache.max_accelerated_files = 10000
opcache.revalidate_freq = 2Step 3: Enable JIT
Add to your php.ini:
ini
opcache.jit = tracing
opcache.jit_buffer_size = 256MStep 4: Test Performance
Run your own benchmarks using the scripts from our series. Monitor:
- Requests per second
- Response time
- Memory usage
- Error logs
Step 5: Deploy
Once testing passes, upgrade your production environment. Start with a single server, monitor for 24-48 hours, then scale to all servers.
While this guide provides a high-level overview of PHP optimization, our dedicated OPcache tuning guide includes complete benchmark data and the specific configuration that delivered a 10% performance improvement.
Frequently Asked Questions
A: Most code will run with minor adjustments. Test thoroughly in staging first. The biggest changes are removed deprecated functions and the new JSON extension requirement.
A: At least 256M for meaningful gains. Monitor opcache_get_status()['jit']['buffer_free'] to see if you need more.
A: Yes, but the gains are minimal because WordPress is I/O‑bound. Enable it anyway — it rarely hurts performance.
A: Yes — you get a 2.8% performance boost, JIT, and new language features with minimal risk.
A: Enabling JIT. The 61% gain on CPU‑heavy tasks is the most significant improvement.
Conclusion
This guide synthesizes six benchmarks into a clear picture of PHP performance:
| Optimization | Performance Gain | Effort |
|---|---|---|
| Upgrading from 7.4 to 8.5 | +2.8% | Low |
| Enabling JIT | +61% (CPU-heavy) | Low |
| WordPress JIT | <5% | Low |
| Laravel/Symfony JIT | +80-95% | Low |
Final recommendation:
- Upgrade to PHP 8.5 — it’s safe and delivers security updates, new features, and a modest performance boost
- Enable JIT — the 61% gain on CPU‑heavy tasks is too significant to ignore
- Test your own workload — real-world results vary; always benchmark your specific application
The days of PHP being “slow” are over. With PHP 8.5 and JIT, the language is highly competitive for CPU‑intensive tasks while maintaining its legendary ease of development.
All raw data and methodology are provided in our benchmark series. Reproduce these tests on your own hardware to validate results.