Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
The codes used in this article are in this GitHub repo.
ReactPHP has various components, such as the event loop, promise, and streams. When you install ReactPHP, these components and a few more are installed, so you don’t have to install the separately.
ReactPHP provides the Child Process utility component as a means to make non-blocking I/O calls. This integrates operating system calls, such as curl or cat, into the event loop so that we can attach a callback function for when specific events happen in the operating system calls we executed.
ReactPHP is a library that allows you to turn PHP into something like Go or Node.js so that tasks can be performed asynchronously. Note that ReactPHP is just a library that you install with Composer. It doesn’t have cumbersome requirements, such as installing a custom PHP extension; it just works as intended.