←back to thread

116 points doekenorg | 2 comments | | HN request time: 0.001s | 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 #
cardanome ◴[] No.44498778[source]
I work daily with PHP and honestly nearly all my code I write is synchronous.

The shared-nothing architecture of PHP makes that really a non-issue for me. Requests never share any state with each other. Something like RabbitMQ can handle communication between systems.

replies(2): >>44498884 #>>44501438 #
alganet ◴[] No.44501438[source]
The shared-nothing architecture is great for some scenarios.

Long running processes and async I/O are a great tool to have though. They are present in PHP for almost two decades now, and despite having many incarnations (select(), libevent, etc) and even frameworks (amp, reactphp, etc) the knowledge is highly transferrable between them if you understand the fundamentals.

replies(1): >>44502716 #
bornfreddy ◴[] No.44502716[source]
I agree, but I would always pick a different language (like Go) for long running processes. PHP is great for shared-nothing apps though.
replies(1): >>44502890 #
1. alganet ◴[] No.44502890[source]
Don't worry, we're not comparing languages here. You are free to chose the language and community that fits best to your approach to software development.
replies(1): >>44504500 #
2. bornfreddy ◴[] No.44504500[source]
Why, thank you for your generosity, you are too kind!