Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129360 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 5CD761A00BC for ; Fri, 21 Nov 2025 11:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1763725026; bh=57QFemwcPrNemLu/YuXIVjS61W4q8FmujSIwbBwKUKM=; h=References:In-Reply-To:From:Date:Subject:Cc:From; b=h9Z9HfCZDaoGQ+fRK61F0fOHjgHdhFm8Ygl4xWxZrMmPceuoTzCEltwkGZ2UeuunB AmmY7bnhqrHCgSad+CMMGA+9M7Kx0fgO2qXun/5FXDH+B5ZUs8KVUQZvkSLITXc9iI nl42D7wSAqQ4kUDOYgBSIKPmqS2LOP9qVaiy/HcVeUcael4I8WDqebgF5fpIydHQ2S GKqmC3MXsujTvopvHd8C4AjUfAifhQS3KJYrauzjRb4MMTdnjI8SQZWZVb1O+7VMBD OBOpRhTn82ODLAwdxvmBH2CbPgGkqIFzIqLkRQsrds7/m/Pil8+PonVdsy4zCTyFLi QVV+XG0SEOwlg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4ACCB1805E2 for ; Fri, 21 Nov 2025 11:37:04 +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=4.9 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, MALFORMED_FREEMAIL,MISSING_HEADERS,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-vk1-f175.google.com (mail-vk1-f175.google.com [209.85.221.175]) (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 ; Fri, 21 Nov 2025 11:36:57 +0000 (UTC) Received: by mail-vk1-f175.google.com with SMTP id 71dfb90a1353d-55b26332196so527283e0c.3 for ; Fri, 21 Nov 2025 03:36:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763725011; x=1764329811; darn=lists.php.net; h=content-transfer-encoding:cc:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=57QFemwcPrNemLu/YuXIVjS61W4q8FmujSIwbBwKUKM=; b=iWluhRXXeSOVjwluJvdTeSHhgevmHzJ8Dsz9Ik5BaIxxHi70CIht9RRBCd0vbMFdYc K4jUpPMC1izqHrmsnvq9gf0DdDx8cGIHoGcRqZlYb9IOYYHzN+e1OOYzuS3FFZg+97aQ 8WnBwFyPqQimoMtdTGkUEIME7Te1093nEQaOWEr/W73MlQwfijzRd9hX3g0iomnadEXs WZ7d+wB08UyPbvNpvNvcGqKgMPHtbgJxiuoK/DR/ooXF1Ap40p9j3CHqmBV+KA61xM/N T6hiBuQTzyRAahiJJ+kU9LvV40BpRFIimSZAQcOcMuG7SYl+OlZ8usirdzaKJjzBxFUH iw0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763725011; x=1764329811; h=content-transfer-encoding:cc: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=57QFemwcPrNemLu/YuXIVjS61W4q8FmujSIwbBwKUKM=; b=uNkx+ETf+zrcmzCKoxU0CpYI/E6t1rEwuM1RR13QXeov1lXV7LLDEcNEkQSCEMaoo1 jOa8cO37knCGSX5qAJP2HEW6y5VZTYCSA5jJZwJQDOe5cOxsxFPU4Jm9ATN2rdqHFWIh YcIWsgFLKwsLgvqnMac/5L8BVNHo4mWokrVDrlZ7CZEVvlzDp5W9TWL9hAON+aLlWrL0 vbMfwJfJClJ5TSAXhg7D0eanKHtZnvDZ1Iz0UYUzE8Fo5cPRFdrCBhHuWiIBhWiFn5O+ egSYXYnF9C33GVBjhAi+O40hw+SQg9yM93noz1u5rH6rU71ryhsPz0e+2Uwu1vHnbyOk dzLQ== X-Gm-Message-State: AOJu0Yz3tjIJdYlaUMuDnBkAyno9k2TwiNdSDKgEbovz/Jx1Ymn/FT/B 7Z5sAMbsUq78LEiQvh2rbKtJwkKr8E8M3TgcOr0JdiIWbbDUOUC+BYtGF0Yh0hgOBs9POyjgZ9O 19sK9+271fO03CnN1KRZ9d320puEck3Q5H3T5wng= X-Gm-Gg: ASbGnct9vc0SNbnL8jTiu6FvONb13ak1sB/urhVr4at6k6OzJtw2csrOAwKVJi0Oc/N pWIcBgos2yYTqSTwJcru7lDBlknSVihTkiyvGwaC4plwKomTNxYYTeJy/PoXuvCCODRjGj2Ni8b eBX/W5mq1lUencSniFD+xwnoU3QcfTkK8yF3VznVn0+w0enitvX85OqeIcSfaJsBbxOG2UBBuB0 y8nycu0i34CT+GmJrECJpLFgtWaNgZTIlUjlw4lHVMHSDTS0zxIX01VivHxF+cMplslSwYUlHWk k0Q7KPoihNbNyVOq3jtxxT50MdI= X-Google-Smtp-Source: AGHT+IFiBHzjPgwy/0lhSXCTCsTuCDkLrrLBuqX3uT8SVagNr3TP9Dn4DCMpt0eeNROS8nn6SNCC4IV2fzl88yIpXnA= X-Received: by 2002:a05:6122:400a:b0:559:85d5:bfbd with SMTP id 71dfb90a1353d-55b8d715209mr404227e0c.9.1763725011544; Fri, 21 Nov 2025 03:36:51 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 21 Nov 2025 13:36:40 +0200 X-Gm-Features: AWmQ_bmiXC2p50NcIqStiaEz4fW5rqnjiYIPlFtDJM1eMjbSK5QDscddUQyHvto Message-ID: Subject: Re: [PHP-DEV] [VOTE] True Async RFC 1.6 Cc: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: edmond.ht@gmail.com (Edmond Dantes) Hello, Thank you a lot. > Swoole=E2=80=99s aim is to leverage PHP=E2=80=99s existing ecosystem rath= er than build a new one. If we were > starting from scratch=E2=80=94discarding PHP=E2=80=99s commonly used func= tions and learning an entirely new > async API=E2=80=94why wouldn=E2=80=99t developers simply switch languages= ? And it turned out to be a very successful solution, which has been proven many times in practice. The first question developers ask when they want to migrate to async is: how much code do I need to rewrite? If the cost of migration is comparable to rewriting the entire project from scratch, then it becomes economically more sensible to hire Go developers and rebuild the project. And PHP=E2=80=99s influence is strong primarily because of the companies th= at run PHP-based projects. So when a company decides to rewrite a project in another language because PHP no longer meets its technical needs, PHP loses that client. That=E2=80=99s why supporting a single runtime and a single API, standardization, is crucial for the technology=E2=80=99s survival. Those were the economic reasons. There are technical reasons as well. In a server that handles multiple requests within a single thread, it is very important that coroutines do not occupy the CPU for too long. If they do, all coroutines in that process are affected. This means that having blocking operations inside a coroutine nullifies the advantages of concurrency. Therefore, intentionally making functions blocking so that code works correctly with shared memory makes the idea of using asynchronous code **pointless**. This does not mean that one solution or another is 100 percent perfect. Each has its drawbacks. The question is whether the drawbacks outweigh the benefits. Swoole made it possible to see that, in practice, using a unified API provides a significant advantage that makes migrating legacy projects feasible. This means that by voting for an RFC built on these principles, we are not venturing into a dark unknown, but walking along a well-trodden path. ---- Ed