3 ms·
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:/
by osrec 8y ago
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 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!
- hu3 8y agoThank 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.
- osrec 8y agoFYI, 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 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!