News for hackers. Stuff that matters.
Re:Combining Golang and PHP can solve real-world development... by osrec on Monday December 10, 2018 @08:05PM (#18652533)
I think the standard PHP model (one process per request), while still popular, is being replaced with fairly robust event loops. I've been using Swoole (https://github.com/swoole/swoole-src) in my company for about a year now, and it has matured into quite a stable code base, even if the documentation is lacking at times. The performance is pretty phenomenal and it has useful async coroutines for interacting with redis/MySQL/PgSQL. I saw some benchmarks in their GitHub issues list where it outperformed Node and Go (taken with a pinch of salt obviously).

If you're afraid of something as experimental as Swoole, more stable options do exist, such as ReactPHP. Not quite as performant apparently, but seem to be popular.

In general, I find that the PHP ecosystem is still thriving. It's definitely one of the easier languages to get up and running with, and now thanks to the community, it's imbibing some of the more advanced features found in more modern languages.

I still love PHP, as much as the 10 year old me did when I started using it 20 years ago. It just gets the job done, even if it is a bit ugly at times!

Re:Combining Golang and PHP can solve real-world development... by hu3 on Tuesday December 11, 2018 @01:15PM (#18657347)
Thank you for sharing your experience with swoole. I didn't know about swoole and will definately play with it to add to my options on future PHP projects.
Re:Combining Golang and PHP can solve real-world development... by osrec on Tuesday December 11, 2018 @02:48PM (#18658231)
FYI, the learning curve is a little steep due to lack of docs, but a friend of mine has started to put together https://swoole.co.uk, which tries to bridge the gaps.

Also, I believe swoole is used extensively by tencent/wechat, so we're in reasonable company!