Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129453 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 751C31A00BC for ; Tue, 25 Nov 2025 12:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1764072934; bh=Sl0Z1Zb7py8r40YXE+xfgI2Kt9AyCc4/pK0ZXL1CGbg=; h=References:In-Reply-To:From:Date:Subject:To:From; b=frW5VPKuhl/0AkZh6gv8t8FTzc2X3a4Ir7zkhbdyBYS2pwuzJEwZXLkgVEabS8yie BtMG4ZRkPqlqruC7lc3O3lROxAZh0hlTOl4l/323lq7fw4frDOYZVKx2lv8XS3J4L7 zI9h/um3phD9Ki+qabxk5Wc/CmjDexcwTBdbrXGN0pEQYFu8X4Rn1ZDyB4GFVFBY+n TW9qRIaPRDhnaSykoc4oKXDYB3YMTpjNrbup5D11WA8qDc/YfVtE1g/1G1sqEwsPkY IXTdJGEPxcnjfaIWYU/SPuSLuU23z0x4cv0hCNHzXM8UyaBrgH8llj/pN0RZoDSQtn YoPbL3gfWQFbQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C516118004A for ; Tue, 25 Nov 2025 12:15:32 +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.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (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 ; Tue, 25 Nov 2025 12:15:32 +0000 (UTC) Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-34101107cc8so4974280a91.0 for ; Tue, 25 Nov 2025 04:15:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=croquemonsieur-be.20230601.gappssmtp.com; s=20230601; t=1764072926; x=1764677726; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Sl0Z1Zb7py8r40YXE+xfgI2Kt9AyCc4/pK0ZXL1CGbg=; b=E7VnT2+RDZ+Oyr9XdnKkvN6Q62T/r+jw43i+ILVtvZxvCpMA25QAQyRGY9QjhNcc2n Ymbvlneqt9FbXoPPIj/vekFQBtNg8kw9ZqZ2xZ1wIYmPxrCRGSeXJnr2ZP6HSS/913SW K/Opn09Pxu0G6myqaeGzMKfgeJ0CPAmTl3UmWDKR5/PwFO9BJmqz/Oj4slPml2RB6ST9 ahhgBVhQQZ1eGadouIpIhLGw61EoLfkFGiYLaGgR3vbd+TlBk8pF3zICqi7gFeNN/oYi NK2119z8MkcumvgYVjg+wdzj2Ggpy0qpJ/vLKr6etI88r3GtfRaia5yhUYc6MFz/96Iv gerg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764072926; x=1764677726; h=content-transfer-encoding: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=Sl0Z1Zb7py8r40YXE+xfgI2Kt9AyCc4/pK0ZXL1CGbg=; b=gYswXfJXuiGPKCPwbb7K2lknx07VDyD0LolUcamgV4MpYEkiDuWtTLjbn1GB27RlH5 YeGkhvYCg8AZIEBzIt5oKIBn8nUDldv+wk7hTu77GJE5ox9fRkmcHMa0a9XhnQFQQHXR 2cuvqFqil5y75jpw8Nrc6rPRTB/OaUkmvP3FBgyU7mmLKyvK01FahB4btHaUMrvc/pit +LyVik36mbRWGwD7gPlyXCFjfc+UVJhJcwgDXRsYhrBZO5kCBaYpku1bLynVlsrmov3Q 0IAstqiSJEwnyHkH80+a0uTcDKuGrfKDhuiL359H7egJorsQKErnaxKRVn666IvwLSpO eyOA== X-Gm-Message-State: AOJu0Yzmh41G8OPgWMtBy0ui9QxzyXMUp0+KfufqeygIpjL2NQwLgaxr zrNUiMrsLthr3y2iXnRqz6LmI13gVv0lFmQeaS5U9EtB/Drv9WFH4PzpRiITTTzFKoECVdkRt8x IvMSD7UWGAJo5g7wqS+WqXbwNMjo/cbj/zbBgwfmFdw8/3piwK6pJC3o= X-Gm-Gg: ASbGnctLUKa//b1GXIG0O0RTPqs4/M0eXxBiWb7i6rXiq3VZUUlxy211P8pw9B4q9ew zXZzbNj30qub4yKyH17pWgURLq6QPFyb8dEujMOftNuR2ON+EROWRyaxl6XJoBjaJBrEX9rqCF0 5Jnr6OFWkeG6EkN26GwVxrgn777dYWwLNy7CiKe8hMFzrBwz1y84EWHf1ebLcT2KYy3Abh9IVib YHzw41vK/ksrQ0IW9uxYBfweyL2z9g6STKrOwuygKMGr+nnkn7JHVLdyB1PIkvmzy0lvVODn6+t RGLpSPZEr1aw3WBMN68m93w7Q6iA X-Google-Smtp-Source: AGHT+IFvoZkuXYSIuul8qf2Gmb+WYnUmfEZLJxy34aAtjfcryhqkfXPEqEC1+okI7XtR5eg40+y60YjvqkJfYw6FffA= X-Received: by 2002:a17:90b:4c8f:b0:341:133:e13d with SMTP id 98e67ed59e1d1-3475ebd2d92mr2458396a91.5.1764072926216; Tue, 25 Nov 2025 04:15:26 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <92865666.4510.1763818506332@email.ionos.de> <329450798.8037.1763822426377@email.ionos.de> <9287c46c-bc63-4dd0-9792-0f9421959589@rwec.co.uk> <65869feb-d518-4de3-8c10-115e3ba7dce7@rwec.co.uk> <55149f3e-7ec7-4479-bd6d-2e7fe1b8edef@rwec.co.uk> <19693420-c091-49b7-b557-e09717239d9b@rwec.co.uk> <1a31ee0e-cbfd-49df-baa6-99d27ae45fc4@app.fastmail.com> In-Reply-To: <1a31ee0e-cbfd-49df-baa6-99d27ae45fc4@app.fastmail.com> Date: Tue, 25 Nov 2025 13:15:13 +0100 X-Gm-Features: AWmQ_bmWvR50FgUJCzx-EdNPuOv4RNSdzygAWNPSfE5rcTHaMVBIeA8sSaU0IgU Message-ID: Subject: Re: [PHP-DEV] [VOTE] True Async RFC 1.6 To: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: bart+php@croquemonsieur.be (Bart Vanhoutte) Op di 25 nov 2025 om 12:54 schreef Rob Landers : > ... Adding an "async" to the function makes it return a Coroutine, that c= an be awaited. This is just a different flavour of coloring. You would now have functions that have "async" and functions that don't have "async". > Then, when/if you call await on this coroutine, and we're not already in = a coroutine, it will spawn one for us, blocking until it returns. If we are= already inside a coroutine, then it blocks until the coroutine completes. > Then you have coloured functions when you want them, but can call them wi= thout having to change your code or "infect" your code with async/await. It= s literally just sugar over the currently proposed RFC, as you'd have to re= turn Coroutines and await them anyway, but this is actually more type-safe. At this point you need to know that a function is `async` because you need to know if you need to call `await` on it. Without coloring, you don't have this problem. Let me see if I can find some time to create some examples using ReactPHP on Github and then we can explore some additional syntax there to see what it would feel like as a developer?