Re: Async operating in PHP
| From: | Daniel Lowrey | Date: | Tue, 25 Feb 2014 17:11:55 +0000 |
| Subject: | Re: Async operating in PHP | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-72811@lists.php.net to get a copy of this message | ||
> Will PHP ever have this? That would certainly be very
> interesting to have, the option to just push away a bigger task.
I'm not sure implementing an event loop in core really jives with PHP's
primary intentions, so I personally don't think it makes much sense to
consider something like this.
That said, you can absolutely implement this yourself right now in userland
using tools like pecl/libevent, pecl/ev or even your own custom userland
loop via stream_select(). There are many people doing this quite
successfully already and using the available extension it's possible to
write non-blocking event-looped applications that are every bit as
performant as node.js.