Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128782 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 84B601A00BC for ; Sun, 5 Oct 2025 19:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1759692137; bh=QZFj7t3VIp1dEwY6G1BA6DUxJKJdXwZpXytvRaGfcFk=; h=References:In-Reply-To:From:Date:Subject:To:From; b=WycI269zFrALiclBBfowBaZjYFbLVpD0S5kqGcZK5PEvUYxl2cGR+VRrfoiCJ4ziM bcr15lUM5nuZP3dMo2IFew06OzZu6ZPrQ56YYEwQYa2ckA8OSmo9wQEUrfhU3ZMQ6Y WXl7qfWY8hm/XjBTK1FQXe2EhilfsQRyQPrE857LAZEukDqJj+Dbl9OjAnO13a3UN0 mQpqoGlTzE2IuXfp2qY52zBwedR6HDCWLoRHHMcbJuqP55zwWs5v8iferxAjnaZsTz AWTRR5JW3ryTg63K9cLBbXx05PNvkHlnmQvvb/208/5537F0J3F9gbTYH9agLo0z61 vDBxwfrWXmlZw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0B2CA1801D7 for ; Sun, 5 Oct 2025 19:22:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 5 Oct 2025 19:22:16 +0000 (UTC) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-b456d2dc440so658565966b.0 for ; Sun, 05 Oct 2025 12:23:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759692213; x=1760297013; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=QZFj7t3VIp1dEwY6G1BA6DUxJKJdXwZpXytvRaGfcFk=; b=E9l6gkwljXCt/V1k474UMJ1316d+rA69se7Y+B2+x9MlOqVusIxIag8fFSwRgVV6d0 BKbQM6Md+ZrmZy2d8zcGLe4MN3Z1aw36SN+9hP9Kd3y2yvdZy9OGeJssEguqh1wMy3Aq F7c0CVw8G/u+fcF4AE6rfYObpMxAGRc++PjaKZv6QiBdhF927zu1WA+nZTnTOFQyDyV5 hQq1CN9TVa183wKmzeKHWmcMRbuBogZRqZm5Kxs1CxirPepo3u0nF4pf/r/417RAf6E9 2tAPowoTf5Ytui8YQW06gHx1JOJe5TWSzR8i7rnGk/cqz1Fijtttb/AodCjgCyYx0TeU davg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759692213; x=1760297013; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QZFj7t3VIp1dEwY6G1BA6DUxJKJdXwZpXytvRaGfcFk=; b=ZB4MRZ7XxCovxP4t46spFjNBV3M10awGIhxhh2ZQzQ+FKuBON30LM32yRW5F0ITZBQ 9/8CpcqwUtVOjOjRtYi4SwMq0nK8bAzEGn7eCnapSZBD9SXQJbzCyxwoajg3Or/tkXEB mkH3UA4x4ejdylsa5tRW7/HcGwqnvKKhw3iHPhFm1LwyyJGxScblTsFlk5/vv6C1/Rhc XK+I63ierGf+NNyqBEoip7sGLKqw6Q3BLzhb6jnZUHtL+YaTIINLse+/SuogoVC5f3Kv Fv1ezcry55z0Ye4p5MgSARzHQkFvpsrwGyQ1nnVmrbK7DOANN4bslWKQUfNWX9O2BWES Gd2A== X-Gm-Message-State: AOJu0Yy6jXFqcKF1O/BR6+3v+Rkc8/kjeR6izMDOC6JRybSdGTsDt9D5 QnJPULYRPR2mNNmYlyYLwfFixWUntrm/u/b4JmnhJeRYgGfLSJnj/wlOV4fUaPvvd5OWSjo32qm f9rcyy4DKHvxYNlbxpUq24+WoDTzp9w1EnSG0OLM= X-Gm-Gg: ASbGncu8KVoobtDqami/SvQ4Vx5B7UJfe5FIhCXvokShk/BhI2X+EBcdPNHexG6gBpi bSbhW92OT5o6aq3Ivxg92mABMKbuksTKrNtfH9+Pf6oOTichZqI+eKDXyn3LkKTyJgCEeYmBvk3 /eQO1WGKUt6p9QbMOBMfUWiJycvtHjNPh/snWDZJ9+wD/V3lX6N/woOMMTkC0v607iSfrVsVKow 2/GdVD7YZqoW1ZqLX4I+vxEgcEwT+tMYUkNJRU0tdHp4mUjVT8= X-Google-Smtp-Source: AGHT+IE1euaLktrWJcMY0ZmX7GNMcDI6nCUdnVzw4QV0frEiyV3A3+kwlqJ7AA8bkddhJ4LwfLMI33A7zDz8X9/YXe4= X-Received: by 2002:a17:906:6a25:b0:b3e:6091:2c65 with SMTP id a640c23a62f3a-b49c4397819mr1205803666b.56.1759692212582; Sun, 05 Oct 2025 12:23:32 -0700 (PDT) Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 5 Oct 2025 20:23:22 +0100 X-Gm-Features: AS18NWDT7TEwRwNWVoUwoLVRV5Wo2sA8dg3jRjh_hhMLkVQi9_IZ8AD08qNiU1k Message-ID: Subject: Re: [PHP-DEV] PHP True Async RFC Stage 4 To: php internals Content-Type: multipart/alternative; boundary="0000000000003ebfc106406e4589" From: adamcable@gmail.com (Adam Cable) --0000000000003ebfc106406e4589 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Oct 5, 2025 at 7:51=E2=80=AFAM Edmond Dantes = wrote: > Good day, everyone. I hope you're doing well. > > I=E2=80=99m happy to present the fourth version of the RFC. It wasn=E2=80= =99t just me > who worked on it =E2=80=94 members of the PHP community contributed as we= ll. > Many thanks to everyone for your input! > > https://wiki.php.net/rfc/true_async > > **What has changed in this version?** > > The RFC has been significantly simplified: > > 1. Components (such as TaskGroup) that can be discussed in separate > RFCs have been removed from the current one. > 2. Coroutines can now be created anywhere =E2=80=94 even inside shutdown_= function. > 3. Added Memory Management and Garbage Collection section > > Although work on the previous API RFC was interrupted and we weren=E2=80= =99t > able to include it in PHP 8.5, it still provided valuable feedback on > the Async API code. > > During this time, I managed to refactor and optimize the TrueAsync > code, which showed promising performance results in I/O scenarios. > > A test integration between **NGINX UNIT** and the **TrueAsync API** > was implemented to evaluate the possibility of using PHP as an > asynchronous backend for a web server: > > https://github.com/EdmondDantes/nginx-unit/tree/true-async/src/true-async= -php > > During this time, the project has come very close to beta status. > > Once again, I want to thank everyone who supported me during difficult > times, offered advice, and helped develop this project. > > Given the maturity of both the code and the RFC, this time I hope to > proceed with a vote. > > Wishing you all a great day, and thank you for your feedback! > Hi, I am so looking forward to this capability! Just a quick question - other methods that tried to provide async/parallel type functionality previously were only available via the CLI. I can see a big opportunity for people running websites with Apache + PHP-FPM where on each page request you do stuff like: Call API 1 (e.g. external auth component) Call API 2 (e.g. product catalogue) Call API 3 (e.g. setup payment processor) Am hoping that you could put these three calls within a Scope and therefore have all three calls run at the same time, and only have to wait as long as the slowest API, rather than the combination of all 3 response times. I didn't see anything in the RFC about this, so just wanted to check. Thanks, Adam --0000000000003ebfc106406e4589 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Oct 5, = 2025 at 7:51=E2=80=AFAM Edmond Dantes <edmond.ht@gmail.com> wrote:
Good day, everyone. I hope you're doing well.<= br>
I=E2=80=99m happy to present the fourth version of the RFC. It wasn=E2=80= =99t just me
who worked on it =E2=80=94 members of the PHP community contributed as well= .
Many thanks to everyone for your input!

https://wiki.php.net/rfc/true_async

**What has changed in this version?**

The RFC has been significantly simplified:

1. Components (such as TaskGroup) that can be discussed in separate
RFCs have been removed from the current one.
2. Coroutines can now be created anywhere =E2=80=94 even inside shutdown_fu= nction.
3. Added Memory Management and Garbage Collection section

Although work on the previous API RFC was interrupted and we weren=E2=80=99= t
able to include it in PHP 8.5, it still provided valuable feedback on
the Async API code.

During this time, I managed to refactor and optimize the TrueAsync
code, which showed promising performance results in I/O scenarios.

A test integration between **NGINX UNIT** and the **TrueAsync API**
was implemented to evaluate the possibility of using PHP as an
asynchronous backend for a web server:
https://github.com/Edmo= ndDantes/nginx-unit/tree/true-async/src/true-async-php

During this time, the project has come very close to beta status.

Once again, I want to thank everyone who supported me during difficult
times, offered advice, and helped develop this project.

Given the maturity of both the code and the RFC, this time I hope to
proceed with a vote.

Wishing you all a great day, and thank you for your feedback!

Hi, I am so looking forward to this cap= ability!

Just a quick qu= estion - other methods that tried to provide async/parallel type functional= ity previously were only available via the CLI.

=
I can see a big opportunity for people running webs= ites with Apache + PHP-FPM where on each page request you do stuff like:

Call API 1 (e.g. external = auth component)
Call API 2 (e.g. product catalogue)<= /div>
Call API 3 (e.g. setup payment processor)

Am hoping that you could put these= three calls within a Scope and therefore have all three calls run at the s= ame time, and only have to wait as long as the slowest API, rather than the= combination of all 3 response times.

I didn't see anything in the RFC about this, so just want= ed to check.

Thanks,
Adam=C2=A0
--0000000000003ebfc106406e4589--