Concurrency and parallelism in PHP (part 1)

This page summarizes the projects mentioned and recommended in the original post on dev.to

Cloudways' Black Friday Offer - 1st Choice of Developers
Cloudways: Devs' 1st choice for managed hosting! Pick from top-tier Cloud providers like DigitalOcean, AWS, and GCE. Limited-time deal: 40% OFF for 4 Months + 40 Free Migrations.
platform.cloudways.com
featured
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
  • You can also check out this and all the next examples in this repository.

  • Cloudways

    Cloudways' Black Friday Offer - 1st Choice of Developers. Cloudways: Devs' 1st choice for managed hosting! Pick from top-tier Cloud providers like DigitalOcean, AWS, and GCE. Limited-time deal: 40% OFF for 4 Months + 40 Free Migrations.

    Cloudways logo
  • http

    Event-driven, streaming HTTP client and server implementation for ReactPHP. (by reactphp)

    This example uses the HTTP package, which provides the ability to consume and serve HTTP resources. The method get returns a Promise, an implementation of CommonJS Promises/A for PHP, which is provided by one of the ReactPHP packages - Promise.

  • async

    Async utilities and fibers for ReactPHP. (by reactphp)

    In this example we create an HttpServer object, which responds immediately to GET requests and, for any other HTTP methods, we defer the response for 2 whole seconds using the await function, provided by the package Async, along with the function sleep, provided by the package PromiseTimer. This way we simulate an asynchronous operation, such as obtaining external HTTP resources or executing database queries.

  • React

    Event-driven, non-blocking I/O with PHP.

    Even though this Generator's side is quite obscure for most PHP developers, it has been extensively explored by well-known libraries, such as ReactPHP and AMPHP, which we will see later on.

  • promises-spec

    An open standard for sound, interoperable JavaScript promises—by implementers, for implementers.

    The method getAsync, as well as their similar postAsync, putAsync, deleteAsync and so on, return a Promise, which implements the Promises/A+ spec. You can chain their calls or wait for all of them concurrently, as we've done. Executing this script would result in something like:

  • CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • iHateWebsocket

    1 project | /r/ProgrammerHumor | 4 Dec 2023
  • ReactPHP – Event-driven, non-blocking I/O with PHP

    1 project | news.ycombinator.com | 24 Jun 2024
  • ReactPHP: Event-driven, non-blocking I/O in pure PHP

    1 project | news.ycombinator.com | 30 May 2024
  • Getting started with asynchronous PHP using ReactPHP

    4 projects | dev.to | 5 Mar 2024
  • Understanding Concurrency in PHP

    1 project | dev.to | 29 Jun 2023