Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129273 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 3863F1A00BC for ; Sun, 16 Nov 2025 16:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1763311197; bh=+rf1e7T9aooWIjCGkjtPoVtJriZU6HCyxxayP1DLDE0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Lddp6dtnQkmmpbtzbBLtc4vfUrD1ViBelxLGp4K1Mi+N6mTMYKn14NSq6Bhgrtiyd iUqagkefzCrwGIQ7XoneeKqnwyfHzq0FnfFN4UlNxcnMokFkt4OWhb6xfwqeROiqw0 h+6004YKh6WAxHaUOGzrSI1cSRhy8022xGVinyvCiiUmYYefbRdEbhSRjAZxCCJSLE 2Jcsaor7m/uNEoQjzorm5WVchwKKB0Ukr4IW8/7Gq5WM+0sI0HxLfZKCUvM7PBuiP9 0p4ZNbf2szfOS/j2h4mr/1GmOIVFwDDihhKXym/jjsrk47KNs9MNJkIpAXyA2MvjEl 60ltFRoLhhhBA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 669BE180041 for ; Sun, 16 Nov 2025 16:39:56 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com [209.85.222.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, 16 Nov 2025 16:39:56 +0000 (UTC) Received: by mail-ua1-f50.google.com with SMTP id a1e0cc1a2514c-937262a397eso932838241.1 for ; Sun, 16 Nov 2025 08:39:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763311190; x=1763915990; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+rf1e7T9aooWIjCGkjtPoVtJriZU6HCyxxayP1DLDE0=; b=UB+A6kkHNNpEpE+8baCNkJ8JpuPGd/Cwzq1Ib5nbD30C5g0U+ukPE7SW2tuMF3mCyC E8hvWlMjK7w/sLm9hv0io1T2yK96RRgjI2GVeAF1sBryFvwHZu5sfHc+W4NBjt4Jiwsz I5vkp934VLV5K7UFymRkljL78DeA8RbRoDiUT5/XbvQoubA8Nl6ebduFQV79jDl0I1HL QvA2lkKX1lHR1I8/yLLIPeu1Em34GAxbVQOMivDoAgaB4n9dRzbjzIsOmk3pNsfzbBr/ SUq4JP5d20x3WtQwFJOk9u31mik7Ici6H6KlTf4mqJXflis7vBLFBosFIOHWexzjWesz qs9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763311190; x=1763915990; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+rf1e7T9aooWIjCGkjtPoVtJriZU6HCyxxayP1DLDE0=; b=hTilkwj26boTHrdUJj2n1y7CxN15vWpFhzGaSxkUHqa6UcGSTJR+VL9l426Kz3CavY FI4+Hdu+itEwlOeMBAtChijH4Um3N6YM4z1H3X1qYi8w3o/Va2sTSGkh4aI7rcLsKss0 jChv++W4Y0gdSqKUPiwdhz6j6QoDyl91RT/LL0bhm66H8upxUSrHIe3RbN03JejJYJ1T i0KymXGVKJc6hDXmGw8qJ0QBX9cnLnv3V63LqumzYOfvtAyutKD1V6v7nhxuE+tYB7Dg x9MLs/VC9AvW8lEFCX0DPN+UAzzi1PeDtze6qX+hpskEwvii3H6EaJ0P3NLaDjdQsHKT dtSw== X-Forwarded-Encrypted: i=1; AJvYcCWn6cQvAyddSz6VZLppsd2iPWhXWogjJpLppsBAyx6sM4yOrpdOxiViB2MoOZnIBGYHngJGPhpPszA=@lists.php.net X-Gm-Message-State: AOJu0YzJtBJhIWN2BS50qWcDmkGsA8U3kZI4DleCAofuct5jsSizsW81 e4ETfmFMTThiAnwCxid0Shsvb/Iz6qqmLBRz2+ubuefXWV45/3UcOODUNdXLekpH0stUAcnfkSw TTgH1MNv3nkawakQfNBllXe47BFRY6l0= X-Gm-Gg: ASbGncuzD1dHXfGwzTX7qXpJIzvWuO8UuptdIQUKskqE1JlXNf5dwoBZLfHdvjsjPdf oLu3hTpz028YHD2iErdaVlvc7Fw8M5TA+v98RW4x+XSI4ZMmdYX/Dqho34PdmuvUdSlCYvcjVnJ JG6DMdYDlo+NXZuYHVhs/YuLJXsHZbkRNaAdUY3ecOVZhw875DsWMmMq7+OQbstPxrI3bgW70hH dFWxaWl90gTZ+SUpNF0XzK+OpOItQAZjUkZnrUC5F409hJnF+a5cgR3jODvvI3A1EwVi/hU91tr JrY3Kz4nzaYrUZfbceUDBs/5OKR9 X-Google-Smtp-Source: AGHT+IHAgq8WMBbG8UKBa3FMPyA4yyZLzX8WSx3hsi1mTQKrmbMVJPhgMDcMVt9+KwJhJsej0ylONCbSXPRLVdB4gc8= X-Received: by 2002:a05:6102:a51:b0:5df:b4c8:b9cf with SMTP id ada2fe7eead31-5dfc566f5damr3182603137.24.1763311189524; Sun, 16 Nov 2025 08:39:49 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <6618a91c-5393-4f40-88b5-b5041ee09deb@app.fastmail.com> <3e0cf0a1-c1a3-4e05-97ba-0eeb7f559a53@app.fastmail.com> In-Reply-To: Date: Sun, 16 Nov 2025 18:39:38 +0200 X-Gm-Features: AWmQ_bkomcCW1kjUztqsqaeLVxPHaSxJT2DmVrCPjRvEllVtkWSd2BuRhv5s9lI Message-ID: Subject: Re: A Thank you (was Re: [PHP-DEV] PHP True Async RFC Stage 5) To: Michael Morris Cc: Deleu , php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: edmond.ht@gmail.com (Edmond Dantes) Hello, Michael Morris > Coming back to your proposal, While I'm very aware of the async pattern f= rom its use in JavaScript and C#, I don't quite get where it will be useful= in PHP. > My experience with PHP is that it responds to HTTP requests and that step= ping over a function that hasn't finished its output isn't helpful because = you aren't really saving any time in that request thread as it has very def= ined start > and end points. But we write PHP scripts the way we do because= of how the language is structured. In the PHP community, there were developers who started using PHP for stateful applications. It seems that Workerman was the first. Then Swoole appeared, which turned PHP into the same thing Node.js turned JavaScript into. Swoole introduced several key features: 1. A built-in HTTP server 2. Coroutines 3. Workers 4. The ability to use standard PHP functions directly inside coroutines This made it possible to use a single PHP process to handle multiple requests, increasing CPU utilization, reducing memory usage, and lowering the number of processes. In certain scenarios, Swoole + JIT PHP performs no worse than Go. This gave companies with legacy PHP projects the ability to avoid rewriting everything in Go. Remember the hype around Node.js a few years ago? =E2=80=9CNode.js is better than PHP, i= t outruns PHP.=E2=80=9D JavaScript itself didn=E2=80=99t become faster, but i= ts async model allowed developers to build more responsive applications with low latency. The secret of that performance boost is exactly the combination of stateful architecture and coroutines. This formula became the holy grail of modern backend applications. Swoole went even further and created an entire software ecosystem that not only made PHP asynchronous but also provided a full set of standard tools for modern backend development. Swoole could have given the language a huge push forward, especially if Symfony and Laravel had adopted it. PHP had a very good chance to compete with Go in the API market, offering simpler development and a large set of ready-made solutions. This is what an alternate universe of PHP could have looked like: a PHP that people would finally stop considering a second-class language. ... It seems I got a bit too carried away dreaming :) I=E2=80=99ll go turn off = my imagination now=E2=80=A6 In other words, it is the absence of asynchrony in the language that is the problem seriously slowing down further development. PHP has a theoretical growth limit in its current form, and it has not yet been reached. > Just, don't give up and don't get frustrated. It's hard. You can still re= ad the Drupal discussion on runtime assertions. > I got rather testy at times after explaining the same thing for the 12th = time. But I didn't take it personal and when my emotions needed checking I'= d step away for a few hours. Thank you for the support. --- Ed