Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128699 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 4DCD61A00BC for ; Sat, 13 Sep 2025 12:42:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1757767254; bh=ZIikpC1pmtmJRiDNgq0x5zcg05GoQ1rSZaFAK4S+79I=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Lic+Z5Unxt9VBxSD232WHvlhgNCGXUJliubXT7G48b8LZQ5H2C++4Fx/gGY7avL5Y z7SqYkQkVsGcoQIw65ps1SIyOEwRVZDocJOH6+0DcKYz+jcjm0JBC/mYWorvqu4VTG 8N3Uc2kQyHR5fjTbkFHlpxZ8Bfq7qbLaEcBIR2v5Hhrg57uLC2YltSc0ap2jkEr4vw XLwLUuGb9/FgDuP4L+DsfCIIIWqUDY39Bb6UfLokbcf3yrUfoPkpHTKeTP8Dr0+AXf zlkHiuk8PzopS4zfE3ovhGf6n4PdoQ1EiMzoocPBGHFQblB11hyaLoo68Va6zkypCX rVZZR71FR9qIw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 414D518006C for ; Sat, 13 Sep 2025 12:40:53 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fout-a4-smtp.messagingengine.com (fout-a4-smtp.messagingengine.com [103.168.172.147]) (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, 13 Sep 2025 12:40:52 +0000 (UTC) Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfout.phl.internal (Postfix) with ESMTP id F1321EC00FC for ; Sat, 13 Sep 2025 08:42:17 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Sat, 13 Sep 2025 08:42:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1757767337; x=1757853737; bh=Su/hn7GUavV0g1lAOGH486EbTotKSse0kuMGDwxnixk=; b= vmdG09Eajw2lHVvuRbrbGD8iz/arn5yDGzeBsN25wnK/C7jxFRThw9fB+LIexSNM jqTctwfnQZy4s8axMYtHJwkR4zBwkPWbLYajhQxab3w0BQ7iDSTHZRHtmMfvrjaN MYv7tz0bg4cIP8vzdMW1bjY6f9hrvsLPa/+W7KoTSvYxe5ZF59QQKmNcouDY2+tx VSaQqiVCtxBu7dz+6Y9bY+MTZdBGeRZoHKS4ZhkNQAJRc4XndyBqwx3pFY9TinFM XWq116oZfhZmaZgXBU5XitWIam6hKjJxF2tWjNQJfoM1hQWOGtaqbPOEhx7D+1iS VRz4od/CvW83fMY/RWp6Nw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1757767337; x=1757853737; bh=S u/hn7GUavV0g1lAOGH486EbTotKSse0kuMGDwxnixk=; b=IYBaj/JAXZ+iHiCPH O4nv0qB4Bw80RA+hK8j28TTmemZ0SXqeFCUSaVtUwi/E/P34o1zoW7zK9GyVUdXy 7ktNzwnc+2h+zdnkLnpH8NgAXGnzHXhG9xzwT50VjYd9gqbdN/VFo0N2AtiIbiHt /zQ7QXlmLQRa/Z2xbQxOZvLXvpKcVZECE+PQZeFFV6bVXJ2+cLcDA9JC5+hBnLx3 hsfkyhDbh3Vpqj39vUyCya978luJEosZocm2uKE1NcJYC87g2O0HxkIqKtajIq4u aYSf91gmipEKTvJ4LcTl7Ps3xVKFo6bOsFoBgaUz5aX8wp8ltyR9l5eckwHr7Ig0 Sc8ag== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdefudeliecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttd dvjeenucfhrhhomhepfdftohifrghnucfvohhmmhhinhhsucglkffoufhorfgnfdcuoehi mhhsohhprdhphhhpsehrfigvtgdrtghordhukheqnecuggftrfgrthhtvghrnhepjeekgf fhuefggfdtueehgefgudeghfdukeejhfetgeeijeelheevlefhfedvhfdunecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihhmshhophdrphhhph esrhifvggtrdgtohdruhhkpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 13 Sep 2025 08:42:17 -0400 (EDT) Message-ID: <9f5788b5-81d6-4411-8181-f56a042276e2@rwec.co.uk> Date: Sat, 13 Sep 2025 13:42:16 +0100 Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Re: Three proposals for PHP 9 To: internals@lists.php.net References: Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 10/09/2025 20:57, Gregory Magarshak wrote: > Hi everyone. Just wanted to follow up on this. Is there any chance of > switch_global_context making it into PHP 9? This would be a huge > game-changer as e.g. FrankenPHP in worker mode could literally be up > to 100x faster than PHP-FPM! But right now, most frameworks which > benefit from the awesome shared-nothing architecture (using static > Foo::$bar, superglobals, PDO, etc.) are stuck, and need a complete > rewrite. With this, they wouldn't. Hi Gregory, Something that's not necessarily obvious to new contributors is that the PHP project has no central organising committee, and no permanent core team. We now have the PHP Foundation to provide some stable funding (persuading companies to sponsor that is a great way to help the project!), but there's no official roadmap or backlog we can add ideas to. What that means is that while new ideas are welcome, they're not necessarily going to get an immediate "yes" or "no". (It also means that everything in this e-mail is just the personal view of a long-term but minor contributor, and not any kind of official policy.) Broadly, you need to start from one of these two points: a) I've got an idea, and the necessary skills to implement it, but before I spend any more time on it I want to know if it's likely to be accepted by the Internals community b) I've got an idea, but don't have the necessary skills to implement it, would anyone be interested in working on it with me? If nobody responds at all to an idea, it probably means that nobody really hates the idea, or can see a reason why it's impossible; but nobody is that excited by it either. If you're interested, you need to develop the idea further, and make clear if you're volunteering to implement it, or looking for a partner to implement it with you. In this case, I'm not really clear what the proposal is, or how it would work. When exactly would the switch_global_context() function be called, and who would choose a value for $name? What kinds of state would it "switch", and how would that be different from switching between separate shared-nothing threads or child processes? Surely some (all?) of the speed-up of an event-based run-time is carrying state from one request to another. I am definitely *not* an expert, but I also suspect it would be a lot more complex than you imply - there's a lot of different memory allocations and pointers involved in the PHP runtime, and even making them thread-safe involves a lot of complexity in the current implementation. P.S. The rule here is to type your reply *below* the quoted text it's referring to, trimming as appropriate, as I've done here. -- Rowan Tommins [IMSoP]