Benchmark 2025: PHP and Competitors — Who is Faster on the Web?

Online Python Trainer for Beginners

Learn Python easily without overwhelming theory. Solve practical tasks with automatic checking, get hints in Russian, and write code directly in your browser — no installation required.

Start Course

Benchmark 2025: PHP vs competitors — who rules the web?



In 2025, the world of web development continues to change, but good old PHP is not giving up its position. On the contrary, with the release of PHP 8.4, which brought an improved JIT compiler and memory optimizations, the community is once again talking about performance. We analyzed the latest independent benchmarks (TechEmpower, Web Framework Benchmarks, as well as tests from the PHP community) and compared PHP with its main competitors: Python (Django/FastAPI), JavaScript (Node.js/Express), Go (Gin) and Java (Spring Boot).



Testing methodology

  • Platform: Linux (Ubuntu 24.04), 8 CPU cores, 16 GB RAM, SSD NVMe.
  • Scenarios: "Hello World" (clean request), JSON serialization, working with PostgreSQL (10,000 records), template rendering.
  • Tools: wrk2 for load, 1000 concurrent connections, test duration — 60 seconds.
  • Versions: PHP 8.4 (with JIT), Python 3.13, Node.js 22, Go 1.23, Java 21.


Results: request speed (req/s)

  • PHP 8.4 (Laravel Octane + Swoole): 285,000 req/s — an impressive leap thanks to asynchronous mode and JIT.
  • Go (Gin): 320,000 req/s — traditional leader in raw performance.
  • Java (Spring Boot + Virtual Threads): 310,000 req/s — virtual threads are catching up to Go.
  • Node.js (Express): 240,000 req/s — stable, but no breakthrough.
  • Python (FastAPI + Uvicorn): 140,000 req/s — asynchronicity helps, but Python is still slower.


Working with JSON and database

In the JSON serialization test (1000 nested objects), PHP 8.4 showed 180,000 operations/sec, which is 15% faster than Node.js and 40% faster than Python. However, Go and Java outperformed PHP by 20-25% — native compilation makes a difference here. When working with PostgreSQL (CRUD operations), PHP with PDO and an asynchronous driver (Swoole) delivered 95,000 transactions/sec, second only to Go (110,000) and Java (105,000). Python lagged behind almost 2 times — 52,000 transactions/sec.



Memory consumption

PHP 8.4 surprised: under peak load, the average RAM consumption was 120 MB per process, which is 1.5 times less than Node.js and 3 times less than Java. Go remains the record holder (80 MB), but PHP has significantly closed the gap. Python, on the contrary, "consumed" 200+ MB.



Conclusions for developers

The 2025 benchmark shows: PHP is not an "old language for forums". With version 8.4 and modern tools (Octane, Swoole, FrankenPHP), it has come close to Go and Java in performance, especially in high-load web scenarios. At the same time, PHP remains one of the easiest to learn and has a huge ecosystem (WordPress, Laravel, Symfony). If your

Recommended Libraries