PHP Performance Debate

The cluster focuses on debates about PHP's speed and performance, including comparisons to languages like Python, Elixir, Ruby, and Java, defenses of modern PHP (e.g., PHP7) with opcode caches, and critiques of frameworks.

πŸ“‰ Falling 0.3x Programming Languages
2,403
Comments
19
Years Active
5
Top Authors
#9544
Topic ID

Activity Over Time

2007
10
2008
44
2009
86
2010
129
2011
170
2012
142
2013
230
2014
161
2015
125
2016
173
2017
119
2018
94
2019
107
2020
185
2021
119
2022
152
2023
135
2024
121
2025
101

Keywords

PHP CPU FPM JIT HipHop OOP FastRoute CGI reddit.com github.com php request fast slow performance frameworks benchmark speed web compiled

Sample Comments

rafark β€’ Nov 3, 2025 β€’ View on HN

Nope. Php is sufficiently fast.

jamesmoss β€’ Jul 27, 2014 β€’ View on HN

Are there any numbers on performance vs php itself?

spiderfarmer β€’ Jul 21, 2019 β€’ View on HN

Isn’t modern PHP much faster though?

philjohn β€’ Jan 25, 2015 β€’ View on HN

I don't buy the whole "slow" thing. I work on a very popular SaaS web app, written in PHP, that is running on far fewer frontend web servers than I've seen running other sites with fewer users written in other languages.With an Opcode cache (available shipped since 5.5) it's perfectly fine performance wise.

desireco42 β€’ Dec 16, 2015 β€’ View on HN

Can't say for sure, but in PHP some modules are writted in C and optimized, it might be that you are seeing that. Overall PHP due to number of things, how collections are processed etc is very slow.Elixir/Phoenix is pretty much consistently fast and encourages practices that I believe will make your app really fast.

hpaavola β€’ Nov 1, 2013 β€’ View on HN

PHP is just a thin layer on top of C. Of course it will perform decently. PHP frameworks are usually designed in a dumb way and thus perform badly. Usually they load all or most of their files into memory with every request, even though only couple files would be enough.

zinxq β€’ Oct 13, 2008 β€’ View on HN

If you're comparing something to PHP's speed, you've already lost.

iends β€’ Nov 10, 2013 β€’ View on HN

The difference in speed between Python and PHP should not be a deciding factor in choosing between the two web frameworks. Many of the core PHP functions are implemented in C directly, so they are very fast, but once you add a framework into the mix, speed drops off considerably because it seems the PHP interpreter is not so good.

djhomeless β€’ Jun 4, 2008 β€’ View on HN

There is no right answer. Despite what others say, php is perfectly suited for a lot of needs. Runtime may be your issue, but you also have to think of supportability.If your looking to optimize your site, as messenlinx suggested yslow is a good place to start. Next, I would suggest looking at your queries, ie a select statement across a big table vs. a more refined query across a smaller data set will do wonders regardless of the language.If your data is updated infrequently, you can look

grey-area β€’ Mar 28, 2013 β€’ View on HN

If you're serving only json snippets from memory and might have hundreds of simultaneous users, yes!If you have existing sites built with it which work fine, then this benchmark doesn't tell you a great deal other than that php is relatively slow, and frameworks built upon it slower. For many websites which have a caching strategy sitting behind a server like apache or nginx and less than a few thousand users a day, this really doesn't matter, and other things like features are more important