←back to thread

116 points doekenorg | 1 comments | | HN request time: 0s | source
Show context
pachico ◴[] No.44498693[source]
I don't write PHP code anymore. I had a great time doing so for years but now I mostly write in Go for a company that writes a lot in PHP.

What I see from PHP is a missed opportunity for not having any native lightweight multi thread capabilities not a robust HTTP server.

I wish the situation changed.

replies(4): >>44498763 #>>44498778 #>>44499135 #>>44499373 #
Cthulhu_ ◴[] No.44499135[source]
It's better to build your app in e.g. PHP, prove its worth, then identify the bottlenecks, THEN determine if you need multi-threading. And if so, determine if PHP would be the best language for it or if you'd be better off going for a different language - one with parallelism / multithreading built into its core architecture.

The first logical step after PHP is NodeJS, which has the fast iteration cycles of PHP without the low-level memory management or the enterprisey application server headaches of other languages, AND it has the advantages of a persistent service without needing to worry too much about parallelism because it's still single process.

But if you still need more performance you have a few options. But if you're at that point, you're already lucky. Most people wish they needed the performance or throughput of a language/environment like Go.

replies(3): >>44499558 #>>44500767 #>>44500930 #
mschuster91 ◴[] No.44500767[source]
> The first logical step after PHP is NodeJS, which has the fast iteration cycles of PHP

... not really, you still have to deal with bundlers in real-world applications.

replies(1): >>44507868 #
1. sroussey ◴[] No.44507868{3}[source]
I use bun and skip builds.