Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122066 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 58199 invoked from network); 30 Dec 2023 09:23:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Dec 2023 09:23:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6E24A180049 for ; Sat, 30 Dec 2023 01:23:48 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (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 ; Sat, 30 Dec 2023 01:23:44 -0800 (PST) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-5f00bef973aso10467367b3.0 for ; Sat, 30 Dec 2023 01:23:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703928196; x=1704532996; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JB5kRKb72WmXGlo/iBYRuw/VfAYGMbSmbY0vHUJhX6g=; b=HpOAI05nEMiSKM6+rb1wFK8xy8IWrZoHH2+6FkMqJjxya/tXbfqZ6JHHiCHIHHq0VY 3lU3MX+Ztm9Fgas0w3fYyHFx+D3eDpbzlJPnbhaAUAaxB/x6u8M2xnYEs5RW/XCh1MmV yaQBi61IwBtranPhBM4TdTDwZBridvtSW6qpzCTct4F8YjEPMb0kI0UNtyu/gyg7CgKn YG4mwojYypccZHOzsZweC+JIfx6nZsnUK89bhc4utN4QFa94JqQnVvX51z3LgEnmDq+W m6psd+WV8FbGlcWNbnS9gGzquAZ3Yl/XF1pZxnLg36+aFkTNwovTbChTonWHf2YMY5JH omoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703928196; x=1704532996; h=cc: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=JB5kRKb72WmXGlo/iBYRuw/VfAYGMbSmbY0vHUJhX6g=; b=WBtCbGr/4EzzBeZ4xBI20y58LzowG7e+P0MTgSgxmGOxmUldEFaiZSWN+gVGnz1Ol4 1nfoNFmnsVIU2qTkW6py95Lw4GAJeRsHaFaXSCvwiJqjoPyXgDRQSCKxhMXU6p3xIWPL hx8ui6t6fZYBn8ejZuU8PnlMX2nKoImAlOy7k4lRmMcX3OR508kCPtgfScukFF/oi25c wWoHodQAb0Cv2fzmB5+pHZN5W0aDMLf8LLcbxN/b5Ada/OMCUo8O5J0HjRFpLjQl/VLX NR+DioDYa+2xp9IkDSZdtVoap5aiBUULJm1LaJ7Aw6pnfYNo0gZHOx2MKUUNq3V3fCau fXdA== X-Gm-Message-State: AOJu0YxfxQ7welb3Mqj5CpIkeZAEU1iwJ0QkULz63xzICGLyXCVJgUPh D6HYEhvG1cqpsSLUKCP0xbHdByh7u3ILeDPqw90= X-Google-Smtp-Source: AGHT+IGX5zNxoMLZSGnuI2py90iTlEHooexRBSpBj0HfsC03QlhRIxt/zZRyHKLymjGQn64CMQRAy9xNrTsKsPo9VGM= X-Received: by 2002:a5b:902:0:b0:dbd:b092:1f3d with SMTP id a2-20020a5b0902000000b00dbdb0921f3dmr7218677ybq.98.1703928195925; Sat, 30 Dec 2023 01:23:15 -0800 (PST) MIME-Version: 1.0 References: <5060b986-2e5a-46e4-9c83-763e5b155e83@gmail.com> <6f7815b9-80cc-4e08-819a-49dca090116f@gmail.com> In-Reply-To: <6f7815b9-80cc-4e08-819a-49dca090116f@gmail.com> Date: Sat, 30 Dec 2023 10:23:04 +0100 Message-ID: To: Rowan Tommins Cc: internals@lists.php.net, =?UTF-8?Q?K=C3=A9vin_Dunglas?= Content-Type: multipart/alternative; boundary="000000000000d74a3a060db6b275" Subject: Re: [PHP-DEV] RFC proposal: worker mode primitives for SAPIs From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --000000000000d74a3a060db6b275 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Rowan, pt., 29 gru 2023 o 23:56 Rowan Tommins napisa=C5= =82(a): > On 29/12/2023 21:14, K=C3=A9vin Dunglas wrote: > ... > The use of objects vs arrays wasn't the main difference I was trying to > highlight there, but rather the overall API of how information gets into > and out of the application. FrankenPHP is the only server listed which > needs to reset global state on each request, because the others > (including Python WSGI and ASGI) use non-global variables for both input > and output. > I wasn't aware of ASGI, in the past I read about WSGI and noticed a PHP connector allowing the PHP app to run inside the WSGI server. I read most of the spec https://asgi.readthedocs.io/en/latest/specs/index.html yesterday and it sounds like a really solid solution. Personally, I'd love to see something similar for PHP. It'd clearly be something different from the usual PHP app where global $_GET|POST variables carry the HTTP request input. Solution taken by Python in fact is about returning a callable fulfilling a specific signature no matter if this is a simple function, closure or Object implementing __invoke function - and this gives much flexibility. I believe that considering the fact that ASGI provides an API for HTTP interaction including WebSockets that could only benefit to PHP ecosystem. In the past, I was thinking about something similar to adopting WSGI but was not aware of ASGI. Cheers, Micha=C5=82 Marcin Brzuchalski --000000000000d74a3a060db6b275--