Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Ligonsker's avatar

Where does PHP being single threaded affect performance and can anything be done to make it better?

I know that PHP run single threaded but servers like nginx can balance the load anyway.

So in what scenarios do other stacks that use some sort of multi threading outperform PHP and can anything be done to improve that?

I still don't fully understand it and couldn't find actual benchmarks comparing between the stacks and their performance

0 likes
5 replies
Sinnbeck's avatar

If you are concerned about the throughput of laravel you can use octane: https://laravel.com/docs/9.x/octane#introduction

But I doubt you are allowed to install it.

Anyways. Laravel scales quite fine without it as nignx can spawn multiple workers to handle the load and read from php syncronous. And I assume that your in-house app wont have much traffic?

1 like
Ligonsker's avatar

@Sinnbeck oh yes but in this case it's for general knowledge - just curious, it's not related to the app I'm working on in my job

And yes they wouldn't have let me install octane anyway 🤣

I just keep hearing that PHP apps are bad for scaling. So where can I actually see the difference

Especially now that I've started learning Go for fun and it's supposedly faster because the way it handles things multi threadedly

Snapey's avatar

I just keep hearing that PHP apps are bad for scaling.

By people who don't know what they are talking about.

2 likes

Please or to participate in this conversation.