4 ms·
> any form of concurrency can't easily be [achieved] with PHP This was true 10 years ago. Not so today - the tools are there, and the frameworks are making it
by dabernathy89 4y ago
> any form of concurrency can't easily be [achieved] with PHP
This was true 10 years ago. Not so today - the tools are there, and the frameworks are making it simple to deploy them.
https://twitter.com/aschmelyun/status/1548270721964462081 https://twitter.com/aschmelyun/status/1548270721964462081
https://laravel.com/docs/9.x/octane https://laravel.com/docs/9.x/octane
https://openswoole.com/article/symfony-swoole https://openswoole.com/article/symfony-swoole
But more importantly: the vast majority of apps don't need this. PHP by itself is fast enough for most use cases when set up properly.
- ozim 4y agoFrom my understanding of how php works it should be "concurrent" by default - each request is handled by web server and then php interpreter is running code in concurrent manner. There is some shared context that is session for example but how I understand it each request is concurrent anyway. Is there support for running single script continously?
- kyriakos 4y agoYour first point assumes that you always run a web application. PHP can be used for general purpose scripting as well. Also even on a Web context how would you support websockets with traditional php? You can how achieve that with swoole.
- dabernathy89 4y agoThat's one way to look at it, but there is much better support now for writing code that behaves concurrently within a single web request.