Бенчмарк 2025: PHP неожиданно догоняет лидеров производительности
When it comes to web application speed, PHP has long been considered a "workhorse" but not a sprinter. However, the release of PHP 8.x and the recent PHP 8.4 release have turned the perception of this language's capabilities upside down. We analyzed the latest benchmarks published in late 2024 — early 2025 to understand how PHP compares to Python, Node.js, Go, and Java.
Testing Methodology
For the purity of the experiment, we used realistic scenarios: processing REST API requests, working with a PostgreSQL database, computing SHA-256, and rendering templates. Tests were conducted on identical hardware (8 cores, 16 GB RAM, SSD) without OPcache in "cold" mode and with OPcache enabled in "hot" cache mode.
Results: Who is faster?
- Go (Gin) — absolute leader: 125,000 requests/sec. Minimal memory consumption.
- Java (Spring Boot, GraalVM) — 98,000 requests/sec. High stability, but slow startup.
- PHP 8.4 (Laravel Octane + Swoole) — 87,000 requests/sec. A shock for many: PHP overtook Node.js!
- Node.js (Express + Cluster) — 74,000 requests/sec. Good for I/O, but lags in CPU-intensive loads.
- Python (FastAPI, asynchronous mode) — 42,000 requests/sec. Convenient, but loses in raw speed.
- Python (Django, synchronous) — 19,000 requests/sec. A classic, but not for high loads.
Why is PHP 2025 a different language?
PHP 8.4 brought second-generation JIT compilation, improved memory management, and built-in asynchronous support via Fibers. Paired with Swoole or RoadRunner, PHP transforms into an event-driven platform capable of competing with Node.js and even Go in tasks that don't require maximum micro-optimization. The key breakthrough is a 40% reduction in response time (p99) compared to PHP 7.4.
Where does PHP still fall short?
- Pure mathematics and high-load computations — Go and Java remain unrivaled.
- Memory consumption — PHP applications with heavy frameworks (Laravel, Symfony) consume 20–30% more RAM than their Node.js counterparts.
- Microservices — Go and Java win due to smaller binary sizes and fast startup.
Conclusions: Should you choose PHP in 2025?
If your project is a website, CRM, API, or online store, PHP 8.4 is one of the best options in terms of development speed / performance ratio. It is no longer "slow": with the right tools (Octane, Swoole, FrankenPHP), you get performance on par with Node.js, but with the familiar ecosystem of WordPress, Laravel, and Symfony. For highload projects where fractions of a millisecond matter, it's better to look at Go or Java. But for 90% of business