<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>#externals</title><link>https://externals.io</link><description>Opening PHP's #internals to the outside</description><pubDate>Mon, 16 Nov 2026 09:54:23 +0000</pubDate><lastBuildDate>Mon, 16 Nov 2026 09:54:23 +0000</lastBuildDate><item><title>[RFC] [Discussion] Query Parameter Manipulation Support</title><link>https://externals.io/message/133106</link><description>&lt;p&gt;Hi Maté,&lt;/p&gt;
&lt;p&gt;I was wondering why QueryParams always needs to be instantiated with a &lt;br&gt;
QueryParamBuildingOptions instance.&lt;/p&gt;
&lt;p&gt;Why couldn't these options instead be passed as arguments to the to*() &lt;br&gt;
methods? It feels a little counterintuitive to configure how the query &lt;br&gt;
string should be built when constructing the object, rather than specifying &lt;br&gt;
that behaviour directly when calling the methods responsible for building &lt;br&gt;
it.&lt;/p&gt;
&lt;p&gt;It also means that if I want to change the behaviour of a to*() method, I &lt;br&gt;
have to reconstruct the entire QueryParams instance.&lt;/p&gt;
&lt;p&gt;I also wondered why QueryParams cannot be constructed from a list of &lt;br&gt;
key/value pairs.&lt;/p&gt;
&lt;p&gt;You already have QueryParams::fromArray() as the counterpart to &lt;br&gt;
QueryParams::toArray(), but I couldn't find a QueryParams::fromList() &lt;br&gt;
method to complement QueryParams::toList().&lt;/p&gt;
&lt;p&gt;Is there a particular design reason behind these choices? &lt;br&gt;
Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;p&gt;On Thu, Nov 12, 2026 at 9:40 AM ignace nyamagana butera &lt;a href="mailto:nyamsprod@gmail.com"&gt;nyamsprod@gmail.com&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Maté,&lt;/p&gt;
&lt;p&gt;I was reviewing your Query Parameter RFC as I was also checking the new &lt;br&gt;
CSV extension RFC around Type Conversion and I see that currently at least &lt;br&gt;
the following behaviour around float &lt;br&gt;
will be changed.&lt;/p&gt;
&lt;p&gt;$data = [ &lt;br&gt;
'a' =&amp;gt; 0.000000000000034, &lt;br&gt;
'b' =&amp;gt; 1.0, &lt;br&gt;
'c' =&amp;gt; 1e-10, &lt;br&gt;
];&lt;/p&gt;
&lt;p&gt;echo http_build_query($data), PHP_EOL; &lt;br&gt;
// a=3.4E-14&amp;amp;b=1&amp;amp;c=1.0E-10 &lt;br&gt;
echo json_encode($data); &lt;br&gt;
// {&amp;quot;a&amp;quot;:3.4e-14,&amp;quot;b&amp;quot;:1,&amp;quot;c&amp;quot;:1.0e-10}&lt;/p&gt;
&lt;p&gt;with the browsers implementations using URLSearchParams I get&lt;/p&gt;
&lt;p&gt;const q = new URLSearchParams({ &lt;br&gt;
'a': 0.000000000000034, &lt;br&gt;
'b': 1.0, &lt;br&gt;
'c': 1e-10, &lt;br&gt;
}); &lt;br&gt;
console.log(q.toString()) &lt;br&gt;
// a=3.4e-14&amp;amp;b=1&amp;amp;c=1e-10&lt;/p&gt;
&lt;p&gt;Maybe the conversion rules difference Uppercase/lowercase for scientific notation regarding floats should be expressed in the RFC &lt;br&gt;
to avoid surprises.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>CAOV5rgYcXFJ5vygNJgDSvfCAVw187hebuRpLPp7PjL=iv++0dg@mail.gmail.com</guid><pubDate>Mon, 16 Nov 2026 08:37:07 +0000</pubDate></item><item><title>[VOTE] [RFC] Case-insensitive extension names in ini_get_all()</title><link>https://externals.io/message/133105</link><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The voting process of RFC &lt;a href="https://wiki.php.net/rfc/case_insensitive_ini_get_all" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/case_insensitive_ini_get_all&lt;/a&gt; &lt;br&gt;
now ends. The results are 20 yeas, 0 nays, 3 abstain. The RFC is now accepted.&lt;/p&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Weilin Du &lt;/p&gt;
</description><guid>tencent_93E72E97E848C49F08125CC14A15BC396409@qq.com</guid><pubDate>Mon, 16 Nov 2026 05:19:21 +0000</pubDate></item><item><title>[RFC] [Discussion] Friends</title><link>https://externals.io/message/133104</link><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;On Thu, Jun 4, 2026 at 2:15 AM Daniel Scherzer &lt;br&gt;
&lt;a href="mailto:daniel.e.scherzer@gmail.com"&gt;daniel.e.scherzer@gmail.com&lt;/a&gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Seeing no further feedback, I have adjusted the RFC and the implementation to only allow access to protected properties/methods/constants. &lt;br&gt;
This qualifies as a &amp;quot;major change&amp;quot; and triggers a 14 day cooldown period.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for RFC, gave it a look and want to add to other's concerns. &lt;br&gt;
Even though the goal of this RFC sounds useful, I strongly believe it &lt;br&gt;
should be fully inverted: not User declares its friends, but all the &lt;br&gt;
clients get access to the internals if they need. Many have pointed &lt;br&gt;
out the violation of LSP, but I would add that the current variant &lt;br&gt;
actually violates most of SOLID principles. It has been implicitly &lt;br&gt;
stated already by other commenters in this or previous thread, but I'd &lt;br&gt;
like to elaborate on this.&lt;/p&gt;
&lt;p&gt;SRP: if User declares UserFactory as a friend, it means that for some &lt;br&gt;
reason it already knows why the factory needs it. In other words, it &lt;br&gt;
goes beyond its responsibility. &lt;br&gt;
OCP: the list of friends will be hardcoded inside the User class with &lt;br&gt;
no possibility to change/extend that. &lt;br&gt;
LSP: already covered. &lt;br&gt;
DIP: the fact that User defines its friends is already a soft cyclic dependency.&lt;/p&gt;
&lt;p&gt;If we look from another angle, a User declaring its friends is &lt;br&gt;
semantically the same as if it described some of its inheritors, which &lt;br&gt;
would also vialote many concerns: a class must know neither its &lt;br&gt;
clients nor possible inheritors. The only thing it could do is declare &lt;br&gt;
such things abstractly.&lt;/p&gt;
&lt;p&gt;So, instead, as I've said, I would go for a fully inverted solution: &lt;br&gt;
the clients themselves declare that they are accessing some other &lt;br&gt;
class' internals, and it would be purely the client's responsibility &lt;br&gt;
if that solution is OK architecturally.&lt;/p&gt;
&lt;p&gt;It could look similar to using the traits, for example:&lt;/p&gt;
&lt;p&gt;class UserFactory &lt;br&gt;
{ &lt;br&gt;
accesses User; // or it could be specific methods inside { ... } &lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;Or maybe even:&lt;/p&gt;
&lt;p&gt;class UserFactory internal to User, SomeOtherClass // exact word is &lt;br&gt;
TBD, and correspond to current PHP reserved words/lexer.&lt;/p&gt;
&lt;p&gt;In this case this &amp;quot;friendship&amp;quot; would just become a sugar for how we do &lt;br&gt;
these things currently anyway using reflection and/or bound closures. &lt;br&gt;
But honestly, I would avoid using the word &amp;quot;friendship&amp;quot; for this &lt;br&gt;
mechanic, because it is too vague or probably even &amp;quot;vulgar&amp;quot;.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Alexandr Egorov.&lt;/p&gt;
</description><guid>CAEM3Mn3hn+cyiNkuNbf7iQXpO7eCNESDCtgEBjwS39prSEnxSw@mail.gmail.com</guid><pubDate>Mon, 16 Nov 2026 00:25:57 +0000</pubDate></item><item><title>[RFC] Scope</title><link>https://externals.io/message/133103</link><description>&lt;p&gt;Hi Larry, Côme,&lt;/p&gt;
&lt;p&gt;Two days ago I changed the RFC so that a new scope starts as a copy of &lt;br&gt;
its creator's state. Writing that rule out in full, for the extension &lt;br&gt;
and for the text, has changed my mind back, and I want to state my &lt;br&gt;
position plainly before the text moves again.&lt;/p&gt;
&lt;p&gt;The copy rule looks like one rule but is not. The six arrays copy with a &lt;br&gt;
reference count, but an object is a handle, not a value: &lt;br&gt;
$_SESSION['user'] holding an entity, or $_GET replaced by an ArrayAccess &lt;br&gt;
object, which PHP allows, is the same instance in both scopes, and a &lt;br&gt;
write inside the new scope reaches the creator. That is the leak a scope &lt;br&gt;
exists to prevent. The session has no copy at all: it is a store with a &lt;br&gt;
lock, and specifying a copy of it meant choosing between writing under a &lt;br&gt;
lock the copy does not hold, a snapshot whose writes vanish, or sharing. &lt;br&gt;
Headers and output cannot be copied either. So &amp;quot;a new scope starts as a &lt;br&gt;
copy&amp;quot; needs a table of what is copied, what is shared and what is &lt;br&gt;
neither, and every later RFC adds a row to it. That is the mess, and the &lt;br&gt;
one who pays for it is whoever creates a scope and has to look up, or &lt;br&gt;
find out by trial, what came along and what did not.&lt;/p&gt;
&lt;p&gt;The clean rule is the one the RFC had until 0.9.5: a new scope is a &lt;br&gt;
clean slate for the state that follows the scope. It has the state the &lt;br&gt;
engine has immediately before the request line is parsed: no query &lt;br&gt;
string, no $_POST, no $_SERVER, no session, locale and timezone at their &lt;br&gt;
php.ini defaults, and the same for whatever a later RFC moves into the &lt;br&gt;
scope. What does not follow the scope is unchanged: $GLOBALS, class &lt;br&gt;
statics and static locals are the application's, loaded once and shared &lt;br&gt;
by every scope, as globals are in every language with such a construct. &lt;br&gt;
It is not a sub scope that inherits some things from the scope that &lt;br&gt;
created it. It is a new scope, as if there had been no request before, &lt;br&gt;
and whoever creates it puts in it what they want, explicitly. That is &lt;br&gt;
one sentence for the request state, it defines &amp;quot;fresh&amp;quot; for every kind of &lt;br&gt;
it at once, now and later, and it leaves the programmer in control of &lt;br&gt;
what is included and how.&lt;/p&gt;
&lt;p&gt;On the landmine: I would rather have the one who creates a scope &lt;br&gt;
discover loudly that $_GET and $_POST are gone than have some things &lt;br&gt;
present and others not. A scope is not something code falls into; the &lt;br&gt;
only one who can run your function in a scope is your caller, who can &lt;br&gt;
clear $_GET before calling you today. Creating a scope is a deliberate &lt;br&gt;
act with a documented meaning, and a loud failure on the first run is a &lt;br&gt;
better outcome than a shared object quietly written to from two scopes.&lt;/p&gt;
&lt;p&gt;That is the version I am comfortable implementing, and it is what the &lt;br&gt;
released extension does; the next version of the RFC returns to it &lt;br&gt;
unless this discussion shows me wrong. If someone wants a more &lt;br&gt;
intertwined Scope, where a new scope inherits part of its creator's &lt;br&gt;
state, I would like to hear how, what exactly is inherited and why, &lt;br&gt;
including what happens to objects and to the session, because I could &lt;br&gt;
not make it hold together. Alternatively, if the list prefers that &lt;br&gt;
direction, I am willing to withdraw the RFC and let someone else take it &lt;br&gt;
over. Either way I will keep implementing the minimal, clean version in &lt;br&gt;
fiber-interop and Swerve.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Frode Børli&lt;/p&gt;
</description><guid>AS8PR08MB7339D0661D92E1E63851F7DFD97E2@AS8PR08MB7339.eurprd08.prod.outlook.com</guid><pubDate>Sat, 14 Nov 2026 22:13:47 +0000</pubDate></item><item><title>[RFC] [Discussion] Friends</title><link>https://externals.io/message/133102</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I'd like to start the discussion for a new RFC about adding friendship in PHP. This is a follow-up to a pre-RFC discussion thread &lt;a href="https://externals.io/message/130710" rel="nofollow" target="_blank"&gt;https://externals.io/message/130710&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/friends" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/friends&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/21937" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/21937&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks, &lt;br&gt;
-Daniel&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'd like to resume discussion of this RFC since I was reminded of it at MergePHP yesterday.&lt;/p&gt;
&lt;p&gt;As far as I can recall and find, there was no remaining feedback that I needed to address. The current proposal is that friendship allows access to protected but not private parts of a class.&lt;/p&gt;
&lt;p&gt;Since it's been a few months, this RFC discussion is considered inactive, and per our policy a new cooldown period is required. This will not go to vote before November 27.&lt;/p&gt;
&lt;p&gt;Please let me know if you have any feedback, &lt;br&gt;
-Daniel&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I had a quick glance at the implementation and can't see any issues. &lt;br&gt;
However, I'm not convinced by the feature and will be voting against it.&lt;/p&gt;
&lt;p&gt;Moreover, I'm not sure I agree with the following premise in the RFC:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The use of reflection for bypassing visibility restrictions in non-test code is generally frowned upon, and should not be recommended.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;While most usages of the reflection API are indeed in test code I don't understand why production code should allegedly not use it. &lt;br&gt;
Especially as in this case it seems to me that making the properties private and using reflection to by-pass the visibility by related components is very much a valid use case.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Gina P. Banyard&lt;/p&gt;
</description><guid>aOSq54Z8ZSDJGs6HIQwvT4Nchm-ViNlbOnJOE6BKwZ5LWBEIKExA_0M2O2wqULq_dvoBbGhv6pDPPBtjpLCfIi-oRikb1-JozZxJh-46mmI=@gpb.moe</guid><pubDate>Sat, 14 Nov 2026 01:44:36 +0000</pubDate></item><item><title>[RFC] [Discussion] Friends</title><link>https://externals.io/message/133101</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;On Sun, May 10, 2026 at 9:28 AM Daniel Scherzer &lt;a href="mailto:daniel.e.scherzer@gmail.com"&gt;daniel.e.scherzer@gmail.com&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I'd like to start the discussion for a new RFC about adding friendship in &lt;br&gt;
PHP. This is a follow-up to a pre-RFC discussion thread &lt;br&gt;
&lt;a href="https://externals.io/message/130710" rel="nofollow" target="_blank"&gt;https://externals.io/message/130710&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/friends" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/friends&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/21937" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/21937&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks, &lt;br&gt;
-Daniel&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'd like to resume discussion of this RFC since I was reminded of it at &lt;br&gt;
MergePHP yesterday.&lt;/p&gt;
&lt;p&gt;As far as I can recall and find, there was no remaining feedback that I &lt;br&gt;
needed to address. The current proposal is that friendship allows access to &lt;br&gt;
protected but not private parts of a class.&lt;/p&gt;
&lt;p&gt;Since it's been a few months, this RFC discussion is considered inactive, &lt;br&gt;
and per our policy a new cooldown period is required. This will not go to &lt;br&gt;
vote before November 27.&lt;/p&gt;
&lt;p&gt;Please let me know if you have any feedback, &lt;br&gt;
-Daniel&lt;/p&gt;
</description><guid>CALaXqqSi3nSD1euD=NrDNW_60qLQO4ac2C-xc8whDP88giAZbQ@mail.gmail.com</guid><pubDate>Sat, 14 Nov 2026 00:28:24 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133100</link><description>&lt;p&gt;Hi Larry,&lt;/p&gt;
&lt;p&gt;On Fri, Nov 13, 2026 at 3:21 PM Larry Garfield &lt;a href="mailto:larry@garfieldtech.com"&gt;larry@garfieldtech.com&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi folks.  Based on the feedback and problems with the previous Context &lt;br&gt;
Managers RFC, Arnaud and I have a new approach to present:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/context-managers-v2" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/context-managers-v2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It basically swaps the two-method approach in favor of &amp;quot;it's a generator, &lt;br&gt;
you're welcome.&amp;quot;  The result is, I think, both simpler and more flexible, &lt;br&gt;
and resolves a number of other issues as well.  More details in the RFC.&lt;/p&gt;
&lt;p&gt;There is a linked implementation, though Arnaud warns it's only partially &lt;br&gt;
complete so go easy on it. :-)  But the design in the RFC is all ready for &lt;br&gt;
review.&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
Larry Garfield &lt;br&gt;
&lt;a href="mailto:larry@garfieldtech.com" rel="nofollow" target="_blank"&gt;larry@garfieldtech.com&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Some feedback on the current RFC draft&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The behavior section says&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;When a using expression is encountered, the GENERATOR is first evaluated &lt;br&gt;
to &lt;br&gt;
ensure it is a Generator object. If it is not, an Error is thrown. (See &lt;br&gt;
the &lt;br&gt;
section below regarding resources, however.)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Can you include some mention of &lt;code&gt;ContextManager&lt;/code&gt; here, since GENERATOR can &lt;br&gt;
be &lt;br&gt;
evaluated to a &lt;code&gt;ContextManager&lt;/code&gt; that is then called to get the generator.&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;I'm wondering about what happens if the generator throws an exception. &lt;br&gt;
Specifically, it could throw after yielding, but before it terminates, i.e. &lt;br&gt;
when it resumes execution after the BODY finishes, returns, or throws.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Looking at the &amp;quot;Implementation details&amp;quot; example desugaring, it seems like &lt;br&gt;
that &lt;br&gt;
exception would just be silently ignored, but I don't see that anywhere in &lt;br&gt;
the &lt;br&gt;
specification.&lt;/p&gt;
&lt;ol start="3"&gt;
&lt;li&gt;
&lt;p&gt;A number of other things trigger errors, but for generators that yield &lt;br&gt;
with &lt;br&gt;
keys, the keys are just silently ignored - did you consider throwing an &lt;br&gt;
error &lt;br&gt;
for that too?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I'd prefer to not add special syntax for this in try-catch, it looks &lt;br&gt;
like it &lt;br&gt;
just saves 3 characters (opening &lt;code&gt;{&lt;/code&gt;, closing &lt;code&gt;};&lt;/code&gt;) plus any whitespace that &lt;br&gt;
the developer wants, and it looks a bit odd to me. We can always add this &lt;br&gt;
later &lt;br&gt;
if it becomes a common pattern. It also means that the returned value from &lt;br&gt;
the &lt;br&gt;
using block cannot be stored anywhere.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Speaking of the returned value from the using block, can you confirm that &lt;br&gt;
&lt;code&gt;NoDiscard&lt;/code&gt; will be handled properly? Consider a modified version of the &lt;br&gt;
&lt;code&gt;file_for_writing&lt;/code&gt; function given as an example:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class="language-php"&gt;/** Returns true if everything succeeded, and false otherwise */
#[\NoDiscard('as failures should be handled')]
function file_for_write(string $file)
{
    $fp = fopen($file, 'w');
    if ($fp) {
        try {
            yield $fp;
            // If this line is reached, then the `using` didn't throw an
exception
            return true;
        } catch (\Exception $e) {
            log('The file failed.');
        } finally {
            fclose($fp);
        }
    }
    // Either `fopen()` didn't succeed, or it succeeded but the `using`
block
    // had an exception.
    return false;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;for the example&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-php"&gt;using (file_for_write('file.txt') =&amp;gt; $fp) {
    foreach ($someThing as $value) {
        fwrite($fp, serialize($value));
    }
};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;the returned value from &lt;code&gt;file_for_write&lt;/code&gt; isn't used and should trigger a &lt;br&gt;
warning.&lt;/p&gt;
&lt;ol start="6"&gt;
&lt;li&gt;Is there a way for the generator to specify that the &lt;em&gt;yielded value&lt;/em&gt; &lt;br&gt;
should &lt;br&gt;
not be discarded? The current RFC text says&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;If no VAR is specified, the yielded value is ignored.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and while &lt;code&gt;NoDiscard&lt;/code&gt; would highlight the ignoring for a function return, it &lt;br&gt;
doesn't for generator yields.&lt;/p&gt;
&lt;p&gt;Thanks, &lt;br&gt;
-Daniel&lt;/p&gt;
</description><guid>CALaXqqS8UG1qvBpwK30zCFOK57=fc6O9xr6TwjdS3ADq5aHs6A@mail.gmail.com</guid><pubDate>Fri, 13 Nov 2026 23:53:15 +0000</pubDate></item><item><title>IPv6-capable hostname lookup in ext/standard</title><link>https://externals.io/message/133099</link><description>&lt;p&gt;Hi Xavier,&lt;/p&gt;
&lt;p&gt;Thanks for the feedback.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;do you plan to return an empty array when there is no failure but no &lt;br&gt;
matching record, or false ?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;An empty array. false is only for when getaddrinfo() itself fails (e.g. &lt;br&gt;
unknown host), with the usual warning like stream connections. &lt;br&gt;
php_network_getaddresses() always queries AF_UNSPEC and $family is applied &lt;br&gt;
afterwards, so it's easy to tell the two cases apart. Relying on &lt;br&gt;
EAI_NODATA/EAI_ADDRFAMILY would not be portable anyway.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;why only A and AAAA? Other records are useful too, especially SVC&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;getaddrinfo() only gives addresses back. SVCB/HTTPS, MX, TXT... are &lt;br&gt;
DNS-only records, and /etc/hosts or nsswitch have no equivalent. They &lt;br&gt;
belong in &lt;code&gt;dns_get_record()&lt;/code&gt;, which does not know SVCB/HTTPS yet. That's a &lt;br&gt;
a good suggestion !&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;do you think you may wrap the syscall with a timeout somehow ?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Not portably. getaddrinfo_a() is glibc only, and otherwise it means a &lt;br&gt;
helper thread. Today the timeout comes from the resolver config &lt;br&gt;
(resolv.conf timeout/attempts and so on), and stream connections behave &lt;br&gt;
the same way since the connect timeout does not cover the name &lt;br&gt;
resolution. I'd rather stay consistent with that.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;may you add the ip of the dns server to reach ?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;getaddrinfo() does not expose it. Depending on nsswitch, the answer can &lt;br&gt;
come from /etc/hosts, nscd, systemd-resolved or mDNS, so there is not &lt;br&gt;
always a DNS server to report. &lt;code&gt;dns_get_record()&lt;/code&gt; is a better fit for that &lt;br&gt;
kind of detail.&lt;/p&gt;
&lt;p&gt;So I'll keep the proposal as is, and the PR will document and test the &lt;br&gt;
empty array vs false behaviour.&lt;/p&gt;
&lt;p&gt;Cheers.&lt;/p&gt;
</description><guid>CA+XhMqw4u_Z5=Sef=4+zL7DStx6=_8mDrNO74iKcedXLyTgbLw@mail.gmail.com</guid><pubDate>Fri, 13 Nov 2026 21:11:57 +0000</pubDate></item><item><title>IPv6-capable hostname lookup in ext/standard</title><link>https://externals.io/message/133098</link><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;Le ven. 13 nov. 2026 à 18:46, David CARLIER &lt;a href="mailto:devnexen@gmail.com"&gt;devnexen@gmail.com&lt;/a&gt; a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi !&lt;/p&gt;
&lt;p&gt;GH-25446 asks for a way to resolve a hostname to IPv6 addresses. &lt;br&gt;
ext/standard cannot do that through the system resolver today:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;gethostbyname()&lt;/code&gt; and &lt;code&gt;gethostbynamel()&lt;/code&gt; are IPv4-only by documentation. &lt;br&gt;
Changing their return values would break callers expecting a dotted quad.&lt;/li&gt;
&lt;li&gt;dns_get_record($host, DNS_AAAA) queries DNS directly and skips &lt;br&gt;
/etc/hosts/nsswitch, so localhost and hosts-file entries do not resolve.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;socket_addrinfo_lookup()&lt;/code&gt; does it right but needs ext/sockets, and you &lt;br&gt;
have to unpack its AddressInfo objects with &lt;code&gt;socket_addrinfo_explain()&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I'd like to add a new function for master, something like:&lt;/p&gt;
&lt;p&gt;function gethostaddresses(string $hostname, int $family = &lt;code&gt;DNS_A&lt;/code&gt; | &lt;br&gt;
DNS_AAAA): array|false {}&lt;/p&gt;
&lt;p&gt;It returns the address strings in getaddrinfo() order, or false on &lt;br&gt;
failure. It goes through the system resolver like stream connections do. &lt;br&gt;
$family reuses DNS_A/DNS_AAAA, since the AF_* constants live in &lt;br&gt;
ext/sockets. php_network_getaddresses() already wraps getaddrinfo(), so the &lt;br&gt;
change is small and fits with the resolver cleanup in GH-15555.&lt;/p&gt;
&lt;p&gt;Kind of open questions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Naming: a new function, or a new parameter on &lt;code&gt;gethostbynamel()&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;Should $family take the DNS_* constants, or should ext/standard get its &lt;br&gt;
own constants?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Unless there are objections, I'll open a PR in the coming days.&lt;/p&gt;
&lt;p&gt;Cheers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Great idea. A few questions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;do you plan to return an empty array when there is no failure but no &lt;br&gt;
matching record, or false ?&lt;/li&gt;
&lt;li&gt;why only A and AAAA? Other records are useful too, especially SVC&lt;/li&gt;
&lt;li&gt;do you think you may wrap the syscall with a timeout somehow ? I’m not &lt;br&gt;
sure it’s possible due to how the kernel handles it but it would be great&lt;/li&gt;
&lt;li&gt;may you add the ip of the dns server to reach ?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With all that, the dns resolution would be much more useful on php.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Xavier&lt;/p&gt;
</description><guid>CAKNL=Fcwu9Rygf5jkK3VeQg5GqhfAbAe0-kDPEzoKYPmWbA=LQ@mail.gmail.com</guid><pubDate>Fri, 13 Nov 2026 20:04:43 +0000</pubDate></item><item><title>IPv6-capable hostname lookup in ext/standard</title><link>https://externals.io/message/133097</link><description>&lt;p&gt;Hi !&lt;/p&gt;
&lt;p&gt;GH-25446 asks for a way to resolve a hostname to IPv6 addresses. &lt;br&gt;
ext/standard cannot do that through the system resolver today:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;gethostbyname()&lt;/code&gt; and &lt;code&gt;gethostbynamel()&lt;/code&gt; are IPv4-only by documentation. &lt;br&gt;
Changing their return values would break callers expecting a dotted quad.&lt;/li&gt;
&lt;li&gt;dns_get_record($host, DNS_AAAA) queries DNS directly and skips &lt;br&gt;
/etc/hosts/nsswitch, so localhost and hosts-file entries do not resolve.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;socket_addrinfo_lookup()&lt;/code&gt; does it right but needs ext/sockets, and you &lt;br&gt;
have to unpack its AddressInfo objects with &lt;code&gt;socket_addrinfo_explain()&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I'd like to add a new function for master, something like:&lt;/p&gt;
&lt;p&gt;function gethostaddresses(string $hostname, int $family = &lt;code&gt;DNS_A&lt;/code&gt; | &lt;br&gt;
DNS_AAAA): array|false {}&lt;/p&gt;
&lt;p&gt;It returns the address strings in getaddrinfo() order, or false on failure. &lt;br&gt;
It goes through the system resolver like stream connections do. $family &lt;br&gt;
reuses DNS_A/DNS_AAAA, since the AF_* constants live in ext/sockets. &lt;br&gt;
php_network_getaddresses() already wraps getaddrinfo(), so the change is &lt;br&gt;
small and fits with the resolver cleanup in GH-15555.&lt;/p&gt;
&lt;p&gt;Kind of open questions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Naming: a new function, or a new parameter on &lt;code&gt;gethostbynamel()&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;Should $family take the DNS_* constants, or should ext/standard get its &lt;br&gt;
own constants?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Unless there are objections, I'll open a PR in the coming days.&lt;/p&gt;
&lt;p&gt;Cheers.&lt;/p&gt;
</description><guid>CA+XhMqx=mzAP-cEE1zmUUdAEE8L66EMG2GA-bXDuPWFmtpGDEA@mail.gmail.com</guid><pubDate>Fri, 13 Nov 2026 17:44:35 +0000</pubDate></item><item><title>[RFC] Scope</title><link>https://externals.io/message/133096</link><description>&lt;p&gt;Hi Larry,&lt;/p&gt;
&lt;p&gt;Thanks, both mails land. You have changed my mind on the default, and I &lt;br&gt;
have updated the RFC to 0.10 accordingly.&lt;/p&gt;
&lt;p&gt;A new scope now starts as a copy of its creator's state, for everything &lt;br&gt;
that follows the scope: the six request arrays, the session, and under &lt;br&gt;
vote B the default locale and timezone. The copy is PHP's copy of an &lt;br&gt;
array, so nothing is duplicated until one side writes, and from then on &lt;br&gt;
the two scopes are independent. Your show_flash_messages() sees the &lt;br&gt;
$_GET and $_SESSION its caller saw, and what it changes stays inside the &lt;br&gt;
scope.&lt;/p&gt;
&lt;p&gt;I went one step further than you suggested and left out the opt-out. A &lt;br&gt;
server that starts a request wants a fresh set, but it gets one by &lt;br&gt;
constructing the request's scope from its own loop, which runs in the &lt;br&gt;
root scope: under the CLI the root's arrays are the CLI's and no session &lt;br&gt;
is open, so the copy is as good as empty, and the server fills the six &lt;br&gt;
as it does today. Anyone who wants a scope emptier than its creator's &lt;br&gt;
can clear what they do not want to pass on. Defining an &amp;quot;empty&amp;quot; option &lt;br&gt;
would mean defining what empty means for each kind of state, now and in &lt;br&gt;
every later RFC, which is exactly the per-concern work the copy rule &lt;br&gt;
avoids. And it can be added later without breaking anything, so leaving &lt;br&gt;
it out costs nothing now.&lt;/p&gt;
&lt;p&gt;That also answers your point about future additions, and Côme's about &lt;br&gt;
moving things later. With the copy rule, a later RFC that adds, say, &lt;br&gt;
&lt;code&gt;ini_set()&lt;/code&gt; values changes nothing for code that only reads them inside a &lt;br&gt;
scope; code that sets them gets containment, which is the point. So the &lt;br&gt;
bitmask is gone, and &amp;quot;a new scope starts empty&amp;quot; with it.&lt;/p&gt;
&lt;p&gt;Two places where &amp;quot;copy&amp;quot; needed spelling out, which 0.10 does. The &lt;br&gt;
session: a scope constructed while a session is active holds the same id &lt;br&gt;
and status and a copy of $_SESSION; it does not open the session again, &lt;br&gt;
so a locking handler's lock is not taken twice, and a write-close in the &lt;br&gt;
copy writes under that id while the creator's later write-close wins, &lt;br&gt;
the same as keeping a copy of $_SESSION in a variable and restoring it. &lt;br&gt;
And output, which you flagged: headers and the body are not values to &lt;br&gt;
copy. A header set inside a scope must still reach the one response the &lt;br&gt;
request has, so they are a sink the creator supplies, by default its &lt;br&gt;
own, not state the copy rule can carry. That is why they need the &lt;br&gt;
integration points listed under Future Scope rather than a vote here, &lt;br&gt;
and I think it also answers whether they can be added later: yes, by &lt;br&gt;
that mechanism, and the copy rule does not stand in the way.&lt;/p&gt;
&lt;p&gt;On listing everything that will eventually follow the scope and voting &lt;br&gt;
on it once: I am not against it, and the copy rule is what makes it &lt;br&gt;
possible without the 21 flags. Future Scope in 0.10 now says that list &lt;br&gt;
is the full picture this RFC is the first step of. Whether the vote &lt;br&gt;
should cover the list as a commitment, as with the resource-to-object &lt;br&gt;
conversion, I would like to hear from the core maintainers before &lt;br&gt;
restructuring the votes.&lt;/p&gt;
&lt;p&gt;0.10 goes on the wiki today, with a changelog entry; the extension's &lt;br&gt;
next release implements the copy, its current one still starts empty.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Frode Børli&lt;/p&gt;
</description><guid>AS8PR08MB7339466471AA2C616D3E1C21D97F2@AS8PR08MB7339.eurprd08.prod.outlook.com</guid><pubDate>Fri, 13 Nov 2026 17:10:29 +0000</pubDate></item><item><title>[RFC][Discussion] Add PASSWORD_BCRYPT_WRAP</title><link>https://externals.io/message/133095</link><description>&lt;p&gt;Hi Mirco,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(Mirco Babin)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Why is the password not validated to be human typable? Repeating &lt;br&gt;
comment 1:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;asserts the password is valid utf-8.&lt;/li&gt;
&lt;li&gt;asserts the password does not contain any ASCII-control-character &lt;br&gt;
between 0 upto and including 31.&lt;/li&gt;
&lt;li&gt;asserts the password does not contain the ASCII-control-character&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start="127"&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;asserts there are no unicode control characters present. Such as, &lt;br&gt;
but not limited to, U+202E Right-to-Left Override, U+2066 &lt;br&gt;
Left-to-Right Isolate, U+2069 Pop Directional Isolate, U+2060 Word &lt;br&gt;
Joiner, U+00A0 ( ) No-Break-Space, U+FEFF Byte Order Mark.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Andrey Andreev)&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Because that would violate modern standards like NIST SP 800-63B-4 &lt;br&gt;
and OWASP ASVS 5 require supporting a length of 64 characters; &lt;br&gt;
Bcrypts limit is 72 &lt;em&gt;bytes&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Mirco Babin) &lt;br&gt;
My question is misunderstood. Why does BCRYPT_WRAP not have a very &lt;br&gt;
first step 0 that validates that &lt;em&gt;password&lt;/em&gt; is human typable, valid &lt;br&gt;
utf-8 and does not contain control characters? Password is input for &lt;br&gt;
the prehash-function, so there is no 72 byte limit.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Your question was not misunderstood. Here's my actual reply verbatim:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To your comments 1 &amp;amp; 2:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Because none of that would fly and I don't agree with it. You're free to &lt;br&gt;
bring up your suggestions as a separate proposal and see how it goes. :)&lt;/li&gt;
&lt;li&gt;Because that would violate modern standards like NIST SP 800-63B-4 and &lt;br&gt;
OWASP ASVS 5 require supporting a length of 64 characters; Bcrypts limit is &lt;br&gt;
72 &lt;em&gt;bytes&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;That was &lt;em&gt;not&lt;/em&gt; meant as &amp;quot;1 &amp;amp; 2 respectively&amp;quot;, but as a general response to &lt;br&gt;
both your comments, since both talked about character validation with the &lt;br&gt;
strong implication of &amp;quot;character-validated Bcrypt&amp;quot; instead. These two &lt;br&gt;
things have a large overlap, especially as you mention Unicode characters, &lt;br&gt;
so I am treating them as a package. Let me rephrase more clearly:&lt;/p&gt;
&lt;p&gt;I am against any character type validation and Bcrypt itself has issues &lt;br&gt;
related to character types.&lt;/p&gt;
&lt;p&gt;Thanks for the link. Why is PBKDF2-HMAC-SHA512 not used? The PBKDF2&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;algorithm is much more available in other languages, and enhances &lt;br&gt;
interoperability. E.g. I could not find a cSHAKE256 implementation &lt;br&gt;
for C#. While PBKDF2 is available out of the c# box see: &lt;br&gt;
&lt;a href="https://learn.microsoft.com/en-us/dotnet/api/system.security.-" rel="nofollow" target="_blank"&gt;https://learn.microsoft.com/en-us/dotnet/api/system.security.-&lt;/a&gt; I am not &lt;br&gt;
looking cryptography.rfc2898derivebytes.pbkdf2 &lt;br&gt;
&lt;a href="https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.rfc2898derivebytes.pbkdf2"&gt;https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.rfc2898derivebytes.pbkdf2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When a C# and PHP application share a database, with cSHAKE256 it &lt;br&gt;
becomes difficult to seed an initial password from the C# application &lt;br&gt;
into the shared PHP database.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You can use PBKDF2 if you want -- it's already in ext/hash -- but I'm not &lt;br&gt;
interested in it being a &lt;code&gt;password_hash()&lt;/code&gt; option for a number of reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It is neither memory-hard nor cache-hard. Argon2 won the PHC because it &lt;br&gt;
is memory-hard and NIST still favors that property, while cryptographers &lt;br&gt;
currently favor Bcrypt for being cache-hard. The only thing everyone agrees &lt;br&gt;
on is that PBKDF2 would be a downgrade.&lt;/li&gt;
&lt;li&gt;It supports &lt;em&gt;too many&lt;/em&gt; hash primitives, and its work factor (iterations) &lt;br&gt;
varies wildly both with each hash function and in how frequently it needs &lt;br&gt;
to be updated. Our current default Bcrypt cost of 12 is good for many years &lt;br&gt;
ahead, whereas we'd need to update PBKDF2 recommended settings all the time.&lt;/li&gt;
&lt;li&gt;The previous point makes it very hard to maintain secure defaults both in &lt;br&gt;
terms of PHP support and as a broader recommendation. bcrypt-wrap is &lt;br&gt;
designed so that you &lt;em&gt;can&lt;/em&gt; say &amp;quot;just use bcrypt-wrap&amp;quot; and not have to &lt;br&gt;
explain details.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As for C#'s lack of cSHAKE support - I'd recommend using BouncyCastle &lt;br&gt;
anyway; the .NET standard library support for modern crypto is notoriously &lt;br&gt;
bad.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(Mirco Babin)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Why is bcrypt-prehashing needed below 73 password-bytes? Bcrypt can &lt;br&gt;
handle 72 bytes just fine.&lt;/p&gt;
&lt;p&gt;Also 54 binary output bytes of the prehash-function, would truncate &lt;br&gt;
the password space to 54 bytes. More than 54 password-bytes is going &lt;br&gt;
to introduce hash-collisions. Assuming the prehash function has no &lt;br&gt;
collisions within the 54 byte range.&lt;/p&gt;
&lt;p&gt;The Bcrypt algorithm truncates the password space beginning at 73 &lt;br&gt;
password-bytes to 72 bytes. So even the flawed Bcrypt algorithm is &lt;br&gt;
superior to this invented algorithm.&lt;/p&gt;
&lt;p&gt;Why is something being proposed, that deteriorates security?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Mirco Babin) &lt;br&gt;
This is not answered. Also using base64 for not having a 0-byte as &lt;br&gt;
input for Bcrypt can be improved. Because this RFC &lt;em&gt;is&lt;/em&gt; an invented &lt;br&gt;
algorithm why not use Consistent Overhead Byte Stuffing (COBS)? That &lt;br&gt;
would make the pre-hash function output 71 bytes, and COBS would &lt;br&gt;
exactly add 1 byte and remove all 0-bytes from it. That 72 bytes, &lt;br&gt;
not containing any 0-byte. would then be the &lt;br&gt;
&amp;quot;password&amp;quot;-input for Bcrypt.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As I said in my last reply, your remaining questions were already very &lt;br&gt;
directly answered in the RFC FAQ. &lt;br&gt;
Not only was this not unanswered, it was the very first critique I received &lt;br&gt;
and there's a full screen worth of text addressing it (even includes &lt;br&gt;
arguments against this new COBS suggestion): &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/password_bcrypt_wrap#doesn_t_decreased_input_space_reduce_bcrypt_security" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/password_bcrypt_wrap#doesn_t_decreased_input_space_reduce_bcrypt_security&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The RFC as is still has no smileys in any example. Please add smileys &lt;br&gt;
into the example in the Proposal section. Like:&lt;/p&gt;
&lt;p&gt;$password = &amp;quot;A really, really long password, that's over 72 bytes &lt;br&gt;
and also includes a nice smiley face 😀&amp;quot;;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Also it is unwanted that $password contains a 0-byte. It is not human &lt;br&gt;
typable, does not make any sense. It should not be allowed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If that's what you want, stick to pure Bcrypt. I will not be adding smileys &lt;br&gt;
to the example at this time - it is already very obvious that there are no &lt;br&gt;
character limitations, and emoji are no more special than any multibyte &lt;br&gt;
character.&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Andrey.&lt;/p&gt;
</description><guid>CAPhkiZxnuzveGm8FXLC6C5eiDKqkVmOoG8h0m69YNSvHqhavog@mail.gmail.com</guid><pubDate>Fri, 13 Nov 2026 14:51:14 +0000</pubDate></item><item><title>[RFC] Prepared Literal String Matching and Replacement</title><link>https://externals.io/message/133094</link><description>&lt;p&gt;Hi Larry,&lt;/p&gt;
&lt;p&gt;Thanks for the review. I've updated the RFC to v0.4 and redone the &lt;br&gt;
measurements. The algorithm itself got further optimizations, and I revised &lt;br&gt;
the benchmark methodology, so the results are more honest and closer to &lt;br&gt;
real product scenarios. The old numbers ran one text over and over. The CPU &lt;br&gt;
learned it, and the new class looked 3-4 times faster than it is. Calls now &lt;br&gt;
go through a pool of different texts. The code has moved to ext/standard.&lt;/p&gt;
&lt;p&gt;I've also substantially rewritten the RFC and the benchmark report. I &lt;br&gt;
removed ambiguous wording and repetition, and put the product scenarios &lt;br&gt;
first.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;My main question is that this feels very niche.  Based on the benchmarks, &lt;br&gt;
if I'm reading them correctly, it sounds like 90% of uses would be better &lt;br&gt;
served with the existing APIs.  Does this make sense for stdlib then?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That share came from the measurement matrix I picked, not from real &lt;br&gt;
applications, so I don't quote it anymore. Instead the RFC now has three &lt;br&gt;
scenarios on real data: comment moderation, bot detection by User-Agent and &lt;br&gt;
auto-linking PHP manual pages. With a reused object the new class is 8-123 &lt;br&gt;
times faster than the fastest existing method. One call on a short text is &lt;br&gt;
slower, and the RFC says so directly. On long texts one call pays off too: &lt;br&gt;
auto-linking 4-16 KiB manual pages with 128-512 names is 2.9-3.6 times &lt;br&gt;
faster.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For example... would this pay off in a long-running process like &lt;br&gt;
FrankenPHP or Swoole, if the object is saved between requests?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, that's the main use case. The object is built when the worker starts &lt;br&gt;
and lives across requests, so the build is paid once. The Summary table &lt;br&gt;
estimates how many calls repay the build.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Matcher::matchAll() returns a list, but each of the items in it &lt;br&gt;
contains, I believe, a unique value.  Could it then return a keyed array &lt;br&gt;
for easier lookup?&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;The items aren't unique. In 'aaa' the key 'a' occurs three times and 'aa' &lt;br&gt;
twice, and different keys can start at the same offset. An array keyed by &lt;br&gt;
keyword or by offset would lose results. getMatchedKeywords() returns the &lt;br&gt;
unique keys. The RFC now spells this out with that example.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;The inout $count argument to Replacer::replace(): Eew.  Please explore &lt;br&gt;
a better way of handling that.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Removed. replace() returns only the string, and a replacement count moved &lt;br&gt;
to Future Scope. Honestly, I don't think it's needed.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Would swapping Replacer in for &lt;code&gt;strtr()&lt;/code&gt; require any subtle logic changes, &lt;br&gt;
or is it a drop-in syntax change?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For a dictionary of non-empty keys and string values the result is the &lt;br&gt;
same. The only differences are in checking the dictionary. An empty key &lt;br&gt;
throws ValueError, while &lt;code&gt;strtr()&lt;/code&gt; skips it with a warning. A non-string &lt;br&gt;
value throws TypeError, while &lt;code&gt;strtr()&lt;/code&gt; converts it. The object keeps a &lt;br&gt;
snapshot of the dictionary. The RFC lists this in the Replacer section.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How would one reinitialize it?  Do you mean calling the constructor &lt;br&gt;
explicitly, which PHP allows even though it's never ever safe to do anyway? &lt;br&gt;
:-)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, I meant calling $object-&amp;gt;__construct(...) again. The error table now &lt;br&gt;
says exactly that.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The whole point of == on objects is to ask &amp;quot;are these equivalent,&amp;quot; and &lt;br&gt;
two Matchers with the same dictionary are equivalent.  Thus they should be &lt;br&gt;
==.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed, done. == on Matcher compares the sets of keys, on Replacer the key &lt;br&gt;
=&amp;gt; value pairs, ignoring order. === still compares identity.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;However, is there a use for a Unicode/Grapheme equivalent?  Even if &lt;br&gt;
future scope, it's worth mentioning.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Exact UTF-8 search already works, since bytes are compared. A grapheme API &lt;br&gt;
would be useful, for example for highlighting, but it's a separate &lt;br&gt;
contract: grapheme boundaries, offset units, normalization, case. I'm not &lt;br&gt;
including it in this RFC.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Please also explain why you've chosen to not follow the same semantics as &lt;br&gt;
one of the existing tools&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Replacement follows &lt;code&gt;strtr()&lt;/code&gt;: existing PHP dictionaries give the same &lt;br&gt;
result, and that matters more to me than compatibility with another &lt;br&gt;
language. Rust's aho-corasick has both modes, and LeftmostLongest picks &lt;br&gt;
matches the same way as Replacer. Go resolves conflicts by argument order: &lt;br&gt;
with the pairs a =&amp;gt; Y and aa =&amp;gt; X, the string aa becomes YY in Go and X in &lt;br&gt;
Replacer and &lt;code&gt;strtr()&lt;/code&gt;. This is in &amp;quot;Design choices&amp;quot;. Matching modes might be &lt;br&gt;
a future extension of the API.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;In &amp;quot;Where existing tools are preferable&amp;quot;, there's a broken link in the &lt;br&gt;
2nd paragraph.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;That was the {{...}} example, which DokuWiki read as media markup. The item &lt;br&gt;
referred to the old measurements and isn't in v0.4.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;These are closely related enough that I think a single vote is fine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed.&lt;/p&gt;
&lt;p&gt;On Fri, Nov 6, 2026 at 6:54 PM Larry Garfield &lt;a href="mailto:larry@garfieldtech.com"&gt;larry@garfieldtech.com&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I'd like to open discussion on this RFC: &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/prepared_literal_string_matching" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/prepared_literal_string_matching&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It proposes Str\Matcher and Str\Replacer for prepared literal substring &lt;br&gt;
search and replacement. Matcher provides presence checks, unique matched &lt;br&gt;
keywords, occurrence counts, and enumeration of all overlapping matches &lt;br&gt;
with byte offsets, using Str\MatchResult objects. Replacer performs &lt;br&gt;
non-overlapping replacements, choosing the earliest start and then the &lt;br&gt;
longest key, without rescanning inserted text.&lt;/p&gt;
&lt;p&gt;Both classes prepare an immutable dictionary during construction. &lt;br&gt;
Matching is byte-oriented, binary-safe, and case-sensitive. Objects can &lt;br&gt;
be &lt;br&gt;
reused within a request or in long-running applications.&lt;/p&gt;
&lt;p&gt;I've implemented the API and published reproducible benchmarks covering &lt;br&gt;
both prepared calls and one-shot use, including construction and &lt;br&gt;
destruction. &lt;br&gt;
Preparation can pay off even for a single call on some inputs. On others, &lt;br&gt;
existing PHP functions or PCRE remain faster, even than a prepared &lt;br&gt;
object.&lt;/p&gt;
&lt;p&gt;I propose including these classes in ext/standard in the Str namespace. &lt;br&gt;
The current implementation is in ext/strmatch. I'd welcome feedback on &lt;br&gt;
the API, integration, error types, and whether Matcher and Replacer &lt;br&gt;
should be considered together or separately.&lt;/p&gt;
&lt;p&gt;Implementation: &lt;br&gt;
&lt;a href="https://github.com/php/php-src/pull/25122" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/25122&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Benchmarks, methodology and raw data:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/ArtUkrainskiy/php-src-bench/tree/main/reports/multi-pattern-search" rel="nofollow" target="_blank"&gt;https://github.com/ArtUkrainskiy/php-src-bench/tree/main/reports/multi-pattern-search&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;-- &lt;br&gt;
Best regards, &lt;br&gt;
Artem Ukrainskiy&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This looks interesting, and I'm not opposed to it.  It somewhat parallels &lt;br&gt;
the recently discussed Pcre class.&lt;/p&gt;
&lt;p&gt;My main question is that this feels very niche.  Based on the benchmarks, &lt;br&gt;
if I'm reading them correctly, it sounds like 90% of uses would be better &lt;br&gt;
served with the existing APIs.  Does this make sense for stdlib then?  It &lt;br&gt;
would be helpful to include more practical examples of where I'd want to &lt;br&gt;
use this instead of &lt;code&gt;str_contains()&lt;/code&gt;, rather than just a table of byte &lt;br&gt;
counts.  The &amp;quot;Where the API can help&amp;quot; section isn't sufficient as-is.&lt;/p&gt;
&lt;p&gt;For example... would this pay off in a long-running process like &lt;br&gt;
FrankenPHP or Swoole, if the object is saved between requests?&lt;/p&gt;
&lt;p&gt;Other issues:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Matcher::matchAll() returns a list, but each of the items in it &lt;br&gt;
contains, I believe, a unique value.  Could it then return a keyed array &lt;br&gt;
for easier lookup?  (The example suggests I may be wrong, but if so, please &lt;br&gt;
spell this out explicitly.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The inout $count argument to Replacer::replace(): Eew.  Please explore a &lt;br&gt;
better way of handling that.  inout params in a language like PHP are the &lt;br&gt;
absolute last resort.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I'm not clear if it says explicitly anywhere if there's behavioral &lt;br&gt;
differences from the existing functions.  If so it wasn't clear.  Would &lt;br&gt;
swapping Replacer in for &lt;code&gt;strtr()&lt;/code&gt; require any subtle logic changes, or is it &lt;br&gt;
a drop-in syntax change?  That should be made explicit.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;quot;Reinitializing an already prepared object throws an Error, even if its &lt;br&gt;
dictionary is empty.&amp;quot; - How would one reinitialize it?  Do you mean calling &lt;br&gt;
the constructor explicitly, which PHP allows even though it's never ever &lt;br&gt;
safe to do anyway? :-)  If so, please clarify that's what you mean.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;quot;two distinct objects compare unequal with ==, even if their &lt;br&gt;
dictionaries are identical. &amp;quot; - I disagree with this.  The whole point of &lt;br&gt;
== on objects is to ask &amp;quot;are these equivalent,&amp;quot; and two Matchers with the &lt;br&gt;
same dictionary are equivalent.  Thus they should be ==.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The RFC notes that these routines are byte-based only, which is fine, as &lt;br&gt;
that's what most of PHP is.  However, is there a use for a Unicode/Grapheme &lt;br&gt;
equivalent?  Even if future scope, it's worth mentioning.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In &amp;quot;Design choices,&amp;quot; you list how existing implementations in other &lt;br&gt;
languages differ.  Please also explain why you've chosen to not follow the &lt;br&gt;
same semantics as one of the existing tools, as that means someone moving &lt;br&gt;
from those languages to PHP is going to be easily confused by the edge &lt;br&gt;
cases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In &amp;quot;Where existing tools are preferable&amp;quot;, there's a broken link in the &lt;br&gt;
2nd paragraph.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;These are closely related enough that I think a single vote is fine. &lt;br&gt;
There's no need to separate them.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;-- &lt;br&gt;
Best regards, &lt;br&gt;
Artem Ukrainskiy&lt;/p&gt;
</description><guid>CAPen=wGOYU8Wb7Rb0W+q7Fb4iTgnftj2tSq=CbVfHBKgirQQbw@mail.gmail.com</guid><pubDate>Fri, 13 Nov 2026 01:54:53 +0000</pubDate></item><item><title>[Meta] This Week In PHP Internals | November 12, 2026</title><link>https://externals.io/message/133093</link><description>&lt;p&gt;Hi Contributors,&lt;/p&gt;
&lt;p&gt;This week's episode is out. Here's the video, plus everywhere else it landed &lt;br&gt;
for visibility.&lt;/p&gt;
&lt;p&gt;Same invitation as always: if I got something wrong, reply in this thread &lt;br&gt;
and &lt;br&gt;
I'll make corrections. That includes how I'm pronouncing your names.&lt;/p&gt;
&lt;p&gt;If you'd rather read than watch, the &lt;a href="http://dev.to" rel="nofollow" target="_blank"&gt;dev.to&lt;/a&gt; post carries the full episode as &lt;br&gt;
an article, which also makes it the easiest version to quote when correcting &lt;br&gt;
me: &lt;a href="https://dev.to/projektgopher/this-week-in-php-internals-nov-12-2026-22bk" rel="nofollow" target="_blank"&gt;https://dev.to/projektgopher/this-week-in-php-internals-nov-12-2026-22bk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;youtube &lt;a href="https://youtu.be/-5PJCG1um6M" rel="nofollow" target="_blank"&gt;https://youtu.be/-5PJCG1um6M&lt;/a&gt; &lt;br&gt;
r/php &lt;br&gt;
&lt;a href="https://www.reddit.com/r/PHP/comments/1xusku1/this_week_in_php_internals_nov_12_2026/" rel="nofollow" target="_blank"&gt;https://www.reddit.com/r/PHP/comments/1xusku1/this_week_in_php_internals_nov_12_2026/&lt;/a&gt; &lt;br&gt;
r/symfony &lt;br&gt;
&lt;a href="https://www.reddit.com/r/symfony/comments/1xuslfi/this_week_in_php_internals_nov_12_2026/" rel="nofollow" target="_blank"&gt;https://www.reddit.com/r/symfony/comments/1xuslfi/this_week_in_php_internals_nov_12_2026/&lt;/a&gt; &lt;br&gt;
r/laravel &lt;br&gt;
&lt;a href="https://www.reddit.com/r/laravel/comments/1xusm1n/this_week_in_php_internals_nov_12_2026/" rel="nofollow" target="_blank"&gt;https://www.reddit.com/r/laravel/comments/1xusm1n/this_week_in_php_internals_nov_12_2026/&lt;/a&gt; &lt;br&gt;
&lt;a href="http://dev.to" rel="nofollow" target="_blank"&gt;dev.to&lt;/a&gt; &lt;br&gt;
&lt;a href="https://dev.to/projektgopher/this-week-in-php-internals-nov-12-2026-22bk" rel="nofollow" target="_blank"&gt;https://dev.to/projektgopher/this-week-in-php-internals-nov-12-2026-22bk&lt;/a&gt; &lt;br&gt;
mastodon &lt;a href="https://phpc.social/@ProjektGopher/117606063411070417" rel="nofollow" target="_blank"&gt;https://phpc.social/@ProjektGopher/117606063411070417&lt;/a&gt; &lt;br&gt;
threads &lt;a href="https://www.threads.com/@projektgopher/post/DfqP4g1EZNV" rel="nofollow" target="_blank"&gt;https://www.threads.com/@projektgopher/post/DfqP4g1EZNV&lt;/a&gt; &lt;br&gt;
bsky &lt;a href="https://bsky.app/profile/projektgopher.com/post/3n25monsamg2t" rel="nofollow" target="_blank"&gt;https://bsky.app/profile/projektgopher.com/post/3n25monsamg2t&lt;/a&gt; &lt;br&gt;
twitter &lt;a href="https://x.com/ProjektGopher/status/2121021762569937154" rel="nofollow" target="_blank"&gt;https://x.com/ProjektGopher/status/2121021762569937154&lt;/a&gt; &lt;br&gt;
linkedin &lt;br&gt;
&lt;a href="https://www.linkedin.com/feed/update/urn:li:activity:7526789227204935680/" rel="nofollow" target="_blank"&gt;https://www.linkedin.com/feed/update/urn:li:activity:7526789227204935680/&lt;/a&gt; &lt;br&gt;
pinkary &lt;br&gt;
&lt;a href="https://pinkary.com/@ProjektGopher/questions/01a1d220-90a2-71dd-962d-06967128d941" rel="nofollow" target="_blank"&gt;https://pinkary.com/@ProjektGopher/questions/01a1d220-90a2-71dd-962d-06967128d941&lt;/a&gt; &lt;br&gt;
dev-null &lt;br&gt;
&lt;a href="https://dev-null.sh/@ProjektGopher/commits/01a1d227-b03e-734a-ac9d-c0363de0a2c4" rel="nofollow" target="_blank"&gt;https://dev-null.sh/@ProjektGopher/commits/01a1d227-b03e-734a-ac9d-c0363de0a2c4&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Len&lt;/p&gt;
</description><guid>CAEwAiAG64t+MMR3Lm5Kz4dP2Zt=r0Ve7TYejnVt_8xgN1nN6iA@mail.gmail.com</guid><pubDate>Thu, 12 Nov 2026 23:53:14 +0000</pubDate></item><item><title>[RFC][Discussion] Add PASSWORD_BCRYPT_WRAP</title><link>https://externals.io/message/133092</link><description>&lt;p&gt;Hi Mirco,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;My question is misunderstood. Why does BCRYPT_WRAP not have a very &lt;br&gt;
first step 0 that validates that&lt;em&gt;password&lt;/em&gt; is human typable, valid &lt;br&gt;
utf-8 and does not contain control characters?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Why would it? Is there some security or usability standard you can point &lt;br&gt;
to that suggests that password input be limited in this way?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Why isn't this bugfixed then. So PASSWORD_ARGON2ID will become &lt;br&gt;
available out of the box?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It is not a &amp;quot;bug&amp;quot; to be &amp;quot;fixed&amp;quot;; it is a decision about what libraries &lt;br&gt;
are included in the source tree of PHP, and which are left as optional &lt;br&gt;
dependencies.&lt;/p&gt;
&lt;p&gt;PHP can have Argon2 support via one of three external libraries: &lt;br&gt;
libargon2, libsodium, or openssl. Making it available in all builds &lt;br&gt;
means including a copy of one of those libraries directly in the source &lt;br&gt;
tree.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Also 54 binary output bytes of the prehash-function, would truncate &lt;br&gt;
the password space to 54 bytes. More than 54 password-bytes is going &lt;br&gt;
to introduce hash-collisions. Assuming the prehash function has no &lt;br&gt;
collisions within the 54 byte range.&lt;/p&gt;
&lt;p&gt;The Bcrypt algorithm truncates the password space beginning at 73 &lt;br&gt;
password-bytes to 72 bytes. So even the flawed Bcrypt algorithm is &lt;br&gt;
superior to this invented algorithm.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is a completely nonsensical comparison.&lt;/p&gt;
&lt;p&gt;A standard bcrypt output contains 23 bytes of final hash data; that's &lt;br&gt;
&amp;quot;only&amp;quot; 2.5 x 10^55 possible outputs. A 54-byte pre-hash has 1.1 x 10^130 &lt;br&gt;
possible values.&lt;/p&gt;
&lt;p&gt;(Additional comparison: the standard Argon2id output contains 32 bytes &lt;br&gt;
of final hash data, for 1.2 x 10^77 possible outputs.)&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
Rowan Tommins &lt;br&gt;
[IMSoP]&lt;/p&gt;
</description><guid>15fed69b-f811-4779-b43a-b5434b27975a@rwec.co.uk</guid><pubDate>Thu, 12 Nov 2026 22:11:23 +0000</pubDate></item><item><title>[RFC][Discussion] Add PASSWORD_BCRYPT_WRAP</title><link>https://externals.io/message/133091</link><description>&lt;p&gt;Hello Andrey Andreev,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;RFC link: &lt;a href="https://wiki.php.net/rfc/password_bcrypt_wrap" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/password_bcrypt_wrap&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;========= &lt;br&gt;
Comment 2&lt;/h1&gt;
&lt;p&gt;(Mirco Babin)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Why is the password not validated to be human typable? Repeating &lt;br&gt;
comment 1:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;asserts the password is valid utf-8.&lt;/li&gt;
&lt;li&gt;asserts the password does not contain any ASCII-control-character &lt;br&gt;
between 0 upto and including 31.&lt;/li&gt;
&lt;li&gt;asserts the password does not contain the ASCII-control-character&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start="127"&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;asserts there are no unicode control characters present. Such as, &lt;br&gt;
but not limited to, U+202E Right-to-Left Override, U+2066 &lt;br&gt;
Left-to-Right Isolate, U+2069 Pop Directional Isolate, U+2060 Word &lt;br&gt;
Joiner, U+00A0 ( ) No-Break-Space, U+FEFF Byte Order Mark.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Andrey Andreev)&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Because that would violate modern standards like NIST SP 800-63B-4 &lt;br&gt;
and OWASP ASVS 5 require supporting a length of 64 characters; &lt;br&gt;
Bcrypts limit is 72 &lt;em&gt;bytes&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Mirco Babin) &lt;br&gt;
My question is misunderstood. Why does BCRYPT_WRAP not have a very &lt;br&gt;
first step 0 that validates that &lt;em&gt;password&lt;/em&gt; is human typable, valid &lt;br&gt;
utf-8 and does not contain control characters? Password is input for &lt;br&gt;
the prehash-function, so there is no 72 byte limit.&lt;/p&gt;
&lt;h1&gt;========= &lt;br&gt;
Comment 4&lt;/h1&gt;
&lt;p&gt;(Mirco Babin)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Why is bcrypt-password-prehashing needed if Php also supports &lt;br&gt;
PASSWORD_ARGON2I and PASSWORD_ARGON2ID out of the box?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Andrey Andreev)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Because Argon2 is not actually supported out of the box, due to its &lt;br&gt;
external dependencies. This is already mentioned in the RFC &lt;br&gt;
Introduction, though perhaps easy to miss; I'll try to remember &lt;br&gt;
adding it to the FAQ.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Mirco Babin) &lt;br&gt;
Why isn't this bugfixed then. So PASSWORD_ARGON2ID will become &lt;br&gt;
available out of the box?&lt;/p&gt;
&lt;h1&gt;========= &lt;br&gt;
Comment 5&lt;/h1&gt;
&lt;p&gt;(Mirco Babin)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Where is cshake256 defined? I did find SHAKE256 at &lt;br&gt;
&lt;a href="https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.202.pdf" rel="nofollow" target="_blank"&gt;https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.202.pdf&lt;/a&gt; &lt;br&gt;
But a &lt;em&gt;c&lt;/em&gt;SHAKE256 is nowhere found?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Andrey Andreev)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cSHAKE is defined by NIST SP800-185: &lt;br&gt;
&lt;a href="https://csrc.nist.gov/pubs/sp/800/185/final" rel="nofollow" target="_blank"&gt;https://csrc.nist.gov/pubs/sp/800/185/final&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Mirco Babin) &lt;br&gt;
Thanks for the link. Why is PBKDF2-HMAC-SHA512 not used? The PBKDF2 &lt;br&gt;
algorithm is much more available in other languages, and enhances &lt;br&gt;
interoperability. E.g. I could not find a cSHAKE256 implementation &lt;br&gt;
for C#. While PBKDF2 is available out of the c# box see: &lt;br&gt;
&lt;a href="https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.rfc2898derivebytes.pbkdf2" rel="nofollow" target="_blank"&gt;https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.rfc2898derivebytes.pbkdf2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When a C# and PHP application share a database, with cSHAKE256 it &lt;br&gt;
becomes difficult to seed an initial password from the C# application &lt;br&gt;
into the shared PHP database.&lt;/p&gt;
&lt;h1&gt;========= &lt;br&gt;
Comment 7&lt;/h1&gt;
&lt;p&gt;The RFC states:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Whichever prehash function is chosen, 54 bytes of binary output are &lt;br&gt;
B64-encoded to fill the 72-byte space allowed by Bcrypt.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Mirco Babin)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Why is bcrypt-prehashing needed below 73 password-bytes? Bcrypt can &lt;br&gt;
handle 72 bytes just fine.&lt;/p&gt;
&lt;p&gt;Also 54 binary output bytes of the prehash-function, would truncate &lt;br&gt;
the password space to 54 bytes. More than 54 password-bytes is going &lt;br&gt;
to introduce hash-collisions. Assuming the prehash function has no &lt;br&gt;
collisions within the 54 byte range.&lt;/p&gt;
&lt;p&gt;The Bcrypt algorithm truncates the password space beginning at 73 &lt;br&gt;
password-bytes to 72 bytes. So even the flawed Bcrypt algorithm is &lt;br&gt;
superior to this invented algorithm.&lt;/p&gt;
&lt;p&gt;Why is something being proposed, that deteriorates security?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Mirco Babin) &lt;br&gt;
This is not answered. Also using base64 for not having a 0-byte as &lt;br&gt;
input for Bcrypt can be improved. Because this RFC &lt;em&gt;is&lt;/em&gt; an invented &lt;br&gt;
algorithm why not use Consistent Overhead Byte Stuffing (COBS)? That &lt;br&gt;
would make the pre-hash function output 71 bytes, and COBS would &lt;br&gt;
exactly add 1 byte and remove all 0-bytes from it. That 72 bytes, &lt;br&gt;
not containing any 0-byte. would then be the &lt;br&gt;
&amp;quot;password&amp;quot;-input for Bcrypt.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Consistent_Overhead_Byte_Stuffing" rel="nofollow" target="_blank"&gt;https://en.wikipedia.org/wiki/Consistent_Overhead_Byte_Stuffing&lt;/a&gt; &lt;br&gt;
&lt;a href="https://github.com/firechip/cobs-conformance" rel="nofollow" target="_blank"&gt;https://github.com/firechip/cobs-conformance&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This would also eliminate the prehash HMAC-SHA512, because that &lt;br&gt;
outputs 64 bytes, which is below 71 bytes.&lt;/p&gt;
&lt;h1&gt;========= &lt;br&gt;
Comment 8&lt;/h1&gt;
&lt;p&gt;(Mirco Babin)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The RFC has no test-vectors. A re-implementation in e.g. C# can never &lt;br&gt;
validate its correctness. Please add test-vectors. Also include &lt;br&gt;
vectors that include smileys and other utf-8 symbols. Not just the &lt;br&gt;
ASCII range.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;(Mirco Babin) &lt;br&gt;
The RFC as is still has no smileys in any example. Please add smileys &lt;br&gt;
into the example in the Proposal section. Like:&lt;/p&gt;
&lt;p&gt;$password = &amp;quot;A really, really long password, that's over 72 bytes &lt;br&gt;
and also includes a nice smiley face 😀&amp;quot;;&lt;/p&gt;
&lt;p&gt;Also it is unwanted that $password contains a 0-byte. It is not human &lt;br&gt;
typable, does not make any sense. It should not be allowed.&lt;/p&gt;
&lt;h1&gt;================= &lt;br&gt;
End of comments&lt;/h1&gt;
&lt;p&gt;Kind regards, &lt;br&gt;
Mirco Babin&lt;/p&gt;
</description><guid>CAFgk54kPEU93iQQEEfPaPJ0QcEFK+XmTkT=Jn1vh2DkMK4Us4g@mail.gmail.com</guid><pubDate>Thu, 12 Nov 2026 20:02:16 +0000</pubDate></item><item><title>[RFC] grapheme_str_pad()</title><link>https://externals.io/message/133090</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;There has been no further feedback since v0.2, so this is the intent &lt;br&gt;
to vote for the grapheme_str_pad() RFC.&lt;/p&gt;
&lt;p&gt;I plan to open the vote on Wednesday, 18 November 2026, at 16:00 UTC. &lt;br&gt;
It will close on Wednesday, 2 December 2026, at 16:00 UTC.&lt;/p&gt;
&lt;p&gt;There is one primary vote. It needs a 2/3 majority.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/grapheme_str_pad" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/grapheme_str_pad&lt;/a&gt; &lt;br&gt;
Discussion thread: &lt;a href="https://news-web.php.net/php.internals/132995" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/132995&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Chris Abner Herrera Navarro&lt;/p&gt;
</description><guid>SA3PR12MB78777805DA627BFB50141C45D6702@SA3PR12MB7877.namprd12.prod.outlook.com</guid><pubDate>Thu, 12 Nov 2026 16:27:13 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133089</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;«A return statement inside the BODY will return from the function the &lt;br&gt;
code is currently executing in. A finally block in the generator &lt;br&gt;
context manager will still be executed, but otherwise control returns &lt;br&gt;
to the function's caller.» &lt;br&gt;
This is also hard to get for me. &lt;br&gt;
Can you detail what this would output: &lt;br&gt;
function &lt;code&gt;context()&lt;/code&gt;: \Generator { &lt;br&gt;
echo &amp;quot;A\n&amp;quot;; &lt;br&gt;
yield &amp;quot;B&amp;quot;; &lt;br&gt;
echo &amp;quot;C\n&amp;quot;; &lt;br&gt;
return &amp;quot;D&amp;quot;; &lt;br&gt;
} &lt;br&gt;
var_dump( &lt;br&gt;
using (context() =&amp;gt; $c) { &lt;br&gt;
echo &amp;quot;E\n&amp;quot;; &lt;br&gt;
return &amp;quot;F&amp;quot;; &lt;br&gt;
} &lt;br&gt;
);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I believe (without actually running it) that would output:&lt;/p&gt;
&lt;p&gt;A &lt;br&gt;
E&lt;/p&gt;
&lt;p&gt;The return &amp;quot;F&amp;quot; terminates the function that the &lt;code&gt;var_dump()&lt;/code&gt;/using() &lt;br&gt;
construct is in.  The generator is discarded without ever reaching its &lt;br&gt;
end, so the generator's return statement is never reached.&lt;/p&gt;
&lt;p&gt;That said, you have brought up an interesting question, I have no idea &lt;br&gt;
what happens when you &lt;code&gt;var_dump()&lt;/code&gt; a compound expression like this that &lt;br&gt;
returns.  Something for Arnaud to write tests for. 0:-)&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Actually I'm wrong.  I checked with Arnaud, and it will print A E C.&lt;/p&gt;
&lt;p&gt;When you return from the CM block, the generator is first resumed so that it gets a chance to do its cleanup, in this case printing C.  When it completes, then the function return happens.  The &lt;code&gt;var_dump()&lt;/code&gt; is never called, because the function returned before that happened.&lt;/p&gt;
&lt;p&gt;I have reworded the RFC a bit to make that clearer.  Thanks for calling it out.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>5b4f7e41-8395-49c8-b45f-9d3fdc59c4b6@app.fastmail.com</guid><pubDate>Thu, 12 Nov 2026 15:15:07 +0000</pubDate></item><item><title>PHP 8.6.0RC7 is available for testing</title><link>https://externals.io/message/133088</link><description>&lt;p&gt;PHP 8.6.0RC7 has just been released and may be downloaded from &lt;br&gt;
&lt;a href="https://downloads.php.net/~svpernova09/" rel="nofollow" target="_blank"&gt;https://downloads.php.net/~svpernova09/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Or use the git tag: php-8.6.0RC7&lt;/p&gt;
&lt;p&gt;This is an early test release and not intended for production use.&lt;/p&gt;
&lt;p&gt;Windows binaries are available at: &lt;br&gt;
&lt;a href="https://www.php.net/pre-release-builds.php#windows" rel="nofollow" target="_blank"&gt;https://www.php.net/pre-release-builds.php#windows&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please test it carefully, and report any bugs at &lt;br&gt;
&lt;a href="https://github.com/php/php-src/issues/new?template=bug_report.yml" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/issues/new?template=bug_report.yml&lt;/a&gt; &lt;br&gt;
on GitHub.&lt;/p&gt;
&lt;p&gt;8.6.0 should be expected in ~1 week, i.e. on 19 Nov 2026.&lt;/p&gt;
&lt;p&gt;Hash values and PGP signatures can be found below or at &lt;br&gt;
&lt;a href="https://gist.github.com/svpernova09/d635b32ec69f5ea8597247f540e6626e" rel="nofollow" target="_blank"&gt;https://gist.github.com/svpernova09/d635b32ec69f5ea8597247f540e6626e&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thank you, and happy testing!&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Matteo Beccati, Joe Ferguson &amp;amp; Daniel Scherzer&lt;/p&gt;
&lt;p&gt;php-8.6.0RC7.tar.bz2 &lt;br&gt;
SHA256 hash: &lt;br&gt;
c3461997f9ad49935e550867f03e6aa13ad589f6ed360bb39a4ae752d482c7cd &lt;br&gt;
PGP signature: &lt;br&gt;
-----BEGIN PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;iQIzBAABCgAdFiEEXP8Xtk3BwkT10OrD5DU14usZAQ4FAmr0+TEACgkQ5DU14usZ &lt;br&gt;
AQ6esBAAi8UWHl6FZk7u5w/VlvSceTtJD8n3vzqAGSI83l87cq3FXzA3qtCWImfw &lt;br&gt;
yj7IpG6tP5CNH46UxRU0Wk7XLW7IJyiesIo73xAJ/d3O1sLIQ55AoRmUFHK54tAr &lt;br&gt;
ZmoMJ/MSVT3j7Twi19ts8mwtMTfHEnsndyGNLTLfVFridqwq/JlovzKLahXDbQqj &lt;br&gt;
e/73XkHjoF6m802Y81eMmBNUTpcxwIbX+Dyr8aKm8RdYp6aW14oRXgPX8iW7U/Ox &lt;br&gt;
UIKZmIZbjA4iGU2ngDEaZi7H4J8NCrtNEs+yxvxs3ZMRPmVO+Oq5H1kfSU8/SvLQ &lt;br&gt;
vkZ800Z4h01qE/bhmo4WsSdv9Em0eW5xjgARdY8aKvukwcnPW1rkY5cSN6hLQqUH &lt;br&gt;
HCarSqMjvrF+nfg8waadE+NZXn7871qEOrCKaL1atkXDwE2HQ99YgVJhzk3QKSYl &lt;br&gt;
WMrcz8JNt2OOtvxQzi8GfSkCULM8Qqf0lXYthwo9UBd/uLjO6RHX1exkYKnhTUXT &lt;br&gt;
05nf3bmdsZJRD6SvUDjugcZ7jlgALfoaQitkSkRpzuHCzXot0dEttP6mo+VIkbLD &lt;br&gt;
yrND24zRSPH5Nbv9q14isKEm1q0N7SKmLtRrcBInLm2nap10EFkM3bw4BppPkv/u &lt;br&gt;
GtdXfyuymXCAJL8K2FUIarJF48tH0adZnAd/kUxtNn8pvPk+Iww= &lt;br&gt;
=EQfp &lt;br&gt;
-----END PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;php-8.6.0RC7.tar.gz &lt;br&gt;
SHA256 hash: &lt;br&gt;
68b753e1d45e1417c6874008500de66102963cf0791e8c541211e9386318722e &lt;br&gt;
PGP signature: &lt;br&gt;
-----BEGIN PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;iQIzBAABCgAdFiEEXP8Xtk3BwkT10OrD5DU14usZAQ4FAmr0+TEACgkQ5DU14usZ &lt;br&gt;
AQ4oGBAAriObALl11jT6dLrakj5gQNuHkoX+SAZqkEyxqTVtMZ5L04bRk3Ys9uiq &lt;br&gt;
q9PCIuWHHD8kkl666P1H5QJ3/qHz36l9akxSi52u1JlTZZ9+IS3Zr18QYCFHB/+r &lt;br&gt;
CSlkkt3mli3W9x4bVir8Rkd+QIeQjt63BvSp+bl/qk8KRYVBQ2ZQ/b2wMW6NF51Z &lt;br&gt;
IKJE7abLyuzZipElbZZ1Wv67Ruby2ml07+S1SWXoEunHDx0nZCKR5JAxkwhURd6p &lt;br&gt;
li4p2Hy74iRNKdIlnMYt0DHN17ReL+vHNKq8qO5oMBnYv29C1ITrOIsfvr+ZgF0v &lt;br&gt;
KOQISWwXrGG8jg0yaADi7BR4NX99TiY/3BzL+8sxFsuvlAqpxtL7/0NSFLBPi8uN &lt;br&gt;
DmvNHbiXLs6tPBF2LdYabBTgtvF76F+uQ9s5/Jr4gbZ8mDRQwrpGexjKUETe51ts &lt;br&gt;
pyzwad1XmHZwtW0F1ZygA7I8g2kiB1Qi7Ap4V1YbKoBTy88z3JUMQd1cZeXJ6ovy &lt;br&gt;
y/1FE6Ts5O5ZC5mPD5heV8urkn/00gt3Kpgonp3QPckonVR6i5gpKRugB2PPgmuP &lt;br&gt;
UyIUYFODQU4qc1rueNNg1pM9gi7z/t1On5hnxERMDP0sKHKIc+7rLhkMtC4WY4nZ &lt;br&gt;
FtkXSNu+fruR6VJBFTM6C2d/XUJZXHJE8MKEPWtkHdpD4nZk1Tc= &lt;br&gt;
=vq1+ &lt;br&gt;
-----END PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;php-8.6.0RC7.tar.xz &lt;br&gt;
SHA256 hash: &lt;br&gt;
63dba3b693d2f2689f12d5264d212d7b813acfd56fb375c620d04e1eef4bb00a &lt;br&gt;
PGP signature: &lt;br&gt;
-----BEGIN PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;iQIzBAABCgAdFiEEXP8Xtk3BwkT10OrD5DU14usZAQ4FAmr0+TEACgkQ5DU14usZ &lt;br&gt;
AQ5ZixAAtI4ZJHCnuGUZE9QKe96iw2BkDPgvQlOAqJOgNT+u1XRXbqbWhTWW/y4L &lt;br&gt;
vgh26flKE2ocOh7C8bllpha6EmZIXQIaFWuD4gGbCueeRwwRGRW/ZOR5O90ENUcd &lt;br&gt;
Ljc6Rj6Ug/cam2PvmvBj4wn43GzJhEUiLQH2QXJBzXAFwo9MDCIx31je+9ENUf8R &lt;br&gt;
v6u/SVCDdfwUau9+HHCelzRdmDa4WbYoiUca0HF+plkMEtxJqrZpfRS2qTuecmva &lt;br&gt;
2aGuAacnymD+wRikK5+2bB06fFyNSN7oZ057Q0vAriqO2XZw6WDRr34BYyxfNdWM &lt;br&gt;
EwbZ9/cACezylJGtnq/93eh5B4LmfZli/9HyLms+wupC7BGrnKR7q6fyvzLg+ExG &lt;br&gt;
Itu3hT8RO0C5kmBjp7ExPbN5rBlD9AvABbIuLt74gNBkErTYaII1mrt+71TNZPZJ &lt;br&gt;
b0EBm/PKFn/RpIdW5kdGNx62jV97k1PD6azHn/W0jHfJXaKWcdJNIktYIqY/h5wL &lt;br&gt;
P3uBQsDM9Di+nwdfWxVFl/Vv1727t9hmSznstcclt63p1VXrw3srA0WhAIpOOXt4 &lt;br&gt;
bMQIg1yJbSqSaw4PjDv5tC55dAxeokJ5FQ9g+3WUpldzUAzKIqQqHaOwxXWSWySN &lt;br&gt;
OYPC8sicq4byPX5t3L0dQI3ttIaPeElOd0LMvMvbwc9p7SarAE4= &lt;br&gt;
=mw2M &lt;br&gt;
-----END PGP SIGNATURE&lt;/p&gt;
</description><guid>CABj1BaYAZwtYRptQSrXJtuSqoN1ftfg617+iJqPwZXWQTjdWCg@mail.gmail.com</guid><pubDate>Thu, 12 Nov 2026 14:26:05 +0000</pubDate></item><item><title>[RFC] Vetting cURL connections with CURLOPT_OPENSOCKETFUNCTION</title><link>https://externals.io/message/133087</link><description>&lt;p&gt;Hi Nicolas,&lt;/p&gt;
&lt;p&gt;Le jeu. 12 nov. 2026 à 11:57, Nicolas Grekas &lt;a href="mailto:nicolas.grekas+php@gmail.com"&gt;nicolas.grekas+php@gmail.com&lt;/a&gt; &lt;br&gt;
a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Xavier,&lt;/p&gt;
&lt;p&gt;thanks for the RFC&lt;/p&gt;
&lt;p&gt;Le jeu. 12 nov. 2026 à 11:45, Xavier Leune &amp;lt; &lt;br&gt;
&lt;a href="mailto:xavier.leune+internals@gmail.com" rel="nofollow" target="_blank"&gt;xavier.leune+internals@gmail.com&lt;/a&gt;&amp;gt; a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;Following the &amp;quot;SSRF protection in curl&amp;quot; thread, I'd like to start the &lt;br&gt;
discussion on this RFC: &lt;a href="https://wiki.php.net/rfc/curl_opensocketfunction" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/curl_opensocketfunction&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It adds CURLOPT_OPENSOCKETFUNCTION to ext/curl, with libcurl's name and &lt;br&gt;
value. The callback is invoked after DNS resolution and before connect(), &lt;br&gt;
once for each socket libcurl is about to create. It returns a bool that &lt;br&gt;
allows or refuses the connection:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;curl_setopt($ch, CURLOPT_OPENSOCKETFUNCTION,
    function (CurlHandle $handle, CurlAddressFamily $family, string
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;$address, ?int $port): bool { &lt;br&gt;
// Only publicly routable addresses. &lt;br&gt;
return $family !== CurlAddressFamily::Unix &lt;br&gt;
&amp;amp;&amp;amp; filter_var($address, FILTER_VALIDATE_IP, &lt;br&gt;
FILTER_FLAG_GLOBAL_RANGE) !== false; &lt;br&gt;
});&lt;/p&gt;
&lt;p&gt;This is the point where an SSRF policy can be enforced reliably. It &lt;br&gt;
applies to the address actually about to be contacted, on every redirect &lt;br&gt;
hop and for every address libcurl tries, whatever spelling the URL used and &lt;br&gt;
whatever DNS answered.&lt;/p&gt;
&lt;p&gt;Compared to the earlier proposals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It returns a bool, as Sjoerd suggested in the thread. No socket is &lt;br&gt;
exposed to userland, and ext/curl gains no dependency on ext/sockets.&lt;/li&gt;
&lt;li&gt;It keeps libcurl's option name, rather than a PHP-specific one.&lt;/li&gt;
&lt;li&gt;The handle comes first, as in the other ext/curl callbacks. A new &lt;br&gt;
CurlAddressFamily enum (IpV4, IpV6, Unix) tells a policy whether $address &lt;br&gt;
is an IP or a socket path. $port is null for UNIX sockets.&lt;/li&gt;
&lt;li&gt;The return type can later be widened, and parameters appended, without &lt;br&gt;
breaking existing callbacks.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The implementation is in &lt;a href="https://github.com/php/php-src/pull/25414" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/25414&lt;/a&gt;, &lt;br&gt;
which supersedes GH-23657.&lt;/p&gt;
&lt;p&gt;A polyfill, curl_hardening (&lt;a href="https://github.com/xavierleune/curl-hardening" rel="nofollow" target="_blank"&gt;https://github.com/xavierleune/curl-hardening&lt;/a&gt;), &lt;br&gt;
implements the same API for PHP 8.3 to 8.6. It stays inert on a PHP that &lt;br&gt;
provides the option natively.&lt;/p&gt;
&lt;p&gt;As discussed with Levi, streams are left to a separate RFC (see Future &lt;br&gt;
Scope).&lt;/p&gt;
&lt;p&gt;Thanks to everyone who took part in the previous thread and reviewed the &lt;br&gt;
PRs. Feedback is welcome.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Xavier&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As I put on the PR, I'd drop the enum and use an int port:&lt;/p&gt;
&lt;p&gt;function (CurlHandle $handle, string $address, int $port): bool&lt;/p&gt;
&lt;p&gt;The address already tells IPv4, IPv6 and UNIX sockets apart, and &lt;br&gt;
&lt;code&gt;filter_var()&lt;/code&gt; rejects a socket path anyway. The enum can even mislead: &lt;br&gt;
::ffff:127.0.0.1 is reported as IpV6. &lt;br&gt;
For UNIX sockets, port 0 is what &lt;code&gt;CURLOPT_PREREQFUNCTION&lt;/code&gt; and &lt;br&gt;
&lt;code&gt;CURLINFO_PRIMARY_PORT&lt;/code&gt; already report/. Using null would be inconsistent and &lt;br&gt;
thus surprizing.&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Nicolas&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for your feedback. I dropped the enum, you're right the new api is &lt;br&gt;
more consistent with other curl callbacks. &lt;br&gt;
PR, RFC and polyfill are up to date,&lt;/p&gt;
&lt;p&gt;Xavier&lt;/p&gt;
</description><guid>CAKNL=FfvnyGjphEEiz+kfrYGKHwu752YyqB+j+pO913VW-C7Ug@mail.gmail.com</guid><pubDate>Thu, 12 Nov 2026 12:47:07 +0000</pubDate></item><item><title>[RFC] Vetting cURL connections with CURLOPT_OPENSOCKETFUNCTION</title><link>https://externals.io/message/133086</link><description>&lt;p&gt;Hi Xavier,&lt;/p&gt;
&lt;p&gt;thanks for the RFC&lt;/p&gt;
&lt;p&gt;Le jeu. 12 nov. 2026 à 11:45, Xavier Leune &lt;a href="mailto:xavier.leune+internals@gmail.com"&gt;xavier.leune+internals@gmail.com&lt;/a&gt; &lt;br&gt;
a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;Following the &amp;quot;SSRF protection in curl&amp;quot; thread, I'd like to start the &lt;br&gt;
discussion on this RFC: &lt;a href="https://wiki.php.net/rfc/curl_opensocketfunction" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/curl_opensocketfunction&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It adds CURLOPT_OPENSOCKETFUNCTION to ext/curl, with libcurl's name and &lt;br&gt;
value. The callback is invoked after DNS resolution and before connect(), &lt;br&gt;
once for each socket libcurl is about to create. It returns a bool that &lt;br&gt;
allows or refuses the connection:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;curl_setopt($ch, CURLOPT_OPENSOCKETFUNCTION,
    function (CurlHandle $handle, CurlAddressFamily $family, string
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;$address, ?int $port): bool { &lt;br&gt;
// Only publicly routable addresses. &lt;br&gt;
return $family !== CurlAddressFamily::Unix &lt;br&gt;
&amp;amp;&amp;amp; filter_var($address, FILTER_VALIDATE_IP, &lt;br&gt;
FILTER_FLAG_GLOBAL_RANGE) !== false; &lt;br&gt;
});&lt;/p&gt;
&lt;p&gt;This is the point where an SSRF policy can be enforced reliably. It &lt;br&gt;
applies to the address actually about to be contacted, on every redirect &lt;br&gt;
hop and for every address libcurl tries, whatever spelling the URL used and &lt;br&gt;
whatever DNS answered.&lt;/p&gt;
&lt;p&gt;Compared to the earlier proposals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It returns a bool, as Sjoerd suggested in the thread. No socket is &lt;br&gt;
exposed to userland, and ext/curl gains no dependency on ext/sockets.&lt;/li&gt;
&lt;li&gt;It keeps libcurl's option name, rather than a PHP-specific one.&lt;/li&gt;
&lt;li&gt;The handle comes first, as in the other ext/curl callbacks. A new &lt;br&gt;
CurlAddressFamily enum (IpV4, IpV6, Unix) tells a policy whether $address &lt;br&gt;
is an IP or a socket path. $port is null for UNIX sockets.&lt;/li&gt;
&lt;li&gt;The return type can later be widened, and parameters appended, without &lt;br&gt;
breaking existing callbacks.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The implementation is in &lt;a href="https://github.com/php/php-src/pull/25414" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/25414&lt;/a&gt;, which &lt;br&gt;
supersedes GH-23657.&lt;/p&gt;
&lt;p&gt;A polyfill, curl_hardening (&lt;a href="https://github.com/xavierleune/curl-hardening" rel="nofollow" target="_blank"&gt;https://github.com/xavierleune/curl-hardening&lt;/a&gt;), &lt;br&gt;
implements the same API for PHP 8.3 to 8.6. It stays inert on a PHP that &lt;br&gt;
provides the option natively.&lt;/p&gt;
&lt;p&gt;As discussed with Levi, streams are left to a separate RFC (see Future &lt;br&gt;
Scope).&lt;/p&gt;
&lt;p&gt;Thanks to everyone who took part in the previous thread and reviewed the &lt;br&gt;
PRs. Feedback is welcome.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Xavier&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As I put on the PR, I'd drop the enum and use an int port:&lt;/p&gt;
&lt;p&gt;function (CurlHandle $handle, string $address, int $port): bool&lt;/p&gt;
&lt;p&gt;The address already tells IPv4, IPv6 and UNIX sockets apart, and &lt;br&gt;
&lt;code&gt;filter_var()&lt;/code&gt; rejects a socket path anyway. The enum can even mislead: &lt;br&gt;
::ffff:127.0.0.1 is reported as IpV6. &lt;br&gt;
For UNIX sockets, port 0 is what &lt;code&gt;CURLOPT_PREREQFUNCTION&lt;/code&gt; and &lt;br&gt;
&lt;code&gt;CURLINFO_PRIMARY_PORT&lt;/code&gt; already report/. Using null would be inconsistent and &lt;br&gt;
thus surprizing.&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Nicolas&lt;/p&gt;
</description><guid>CAOWwgpkrHpQbGDMpHUf=x-RYjry9T6_MXQabCC00YE2gv6COSQ@mail.gmail.com</guid><pubDate>Thu, 12 Nov 2026 10:56:49 +0000</pubDate></item><item><title>[RFC] Vetting cURL connections with CURLOPT_OPENSOCKETFUNCTION</title><link>https://externals.io/message/133085</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;Following the &amp;quot;SSRF protection in curl&amp;quot; thread, I'd like to start the &lt;br&gt;
discussion on this RFC: &lt;a href="https://wiki.php.net/rfc/curl_opensocketfunction" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/curl_opensocketfunction&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It adds CURLOPT_OPENSOCKETFUNCTION to ext/curl, with libcurl's name and &lt;br&gt;
value. The callback is invoked after DNS resolution and before connect(), &lt;br&gt;
once for each socket libcurl is about to create. It returns a bool that &lt;br&gt;
allows or refuses the connection:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;curl_setopt($ch, CURLOPT_OPENSOCKETFUNCTION,
    function (CurlHandle $handle, CurlAddressFamily $family, string
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;$address, ?int $port): bool { &lt;br&gt;
// Only publicly routable addresses. &lt;br&gt;
return $family !== CurlAddressFamily::Unix &lt;br&gt;
&amp;amp;&amp;amp; filter_var($address, FILTER_VALIDATE_IP, &lt;br&gt;
FILTER_FLAG_GLOBAL_RANGE) !== false; &lt;br&gt;
});&lt;/p&gt;
&lt;p&gt;This is the point where an SSRF policy can be enforced reliably. It applies &lt;br&gt;
to the address actually about to be contacted, on every redirect hop and &lt;br&gt;
for every address libcurl tries, whatever spelling the URL used and &lt;br&gt;
whatever DNS answered.&lt;/p&gt;
&lt;p&gt;Compared to the earlier proposals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It returns a bool, as Sjoerd suggested in the thread. No socket is &lt;br&gt;
exposed to userland, and ext/curl gains no dependency on ext/sockets.&lt;/li&gt;
&lt;li&gt;It keeps libcurl's option name, rather than a PHP-specific one.&lt;/li&gt;
&lt;li&gt;The handle comes first, as in the other ext/curl callbacks. A new &lt;br&gt;
CurlAddressFamily enum (IpV4, IpV6, Unix) tells a policy whether $address &lt;br&gt;
is an IP or a socket path. $port is null for UNIX sockets.&lt;/li&gt;
&lt;li&gt;The return type can later be widened, and parameters appended, without &lt;br&gt;
breaking existing callbacks.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The implementation is in &lt;a href="https://github.com/php/php-src/pull/25414" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/25414&lt;/a&gt;, which &lt;br&gt;
supersedes GH-23657.&lt;/p&gt;
&lt;p&gt;A polyfill, curl_hardening (&lt;a href="https://github.com/xavierleune/curl-hardening" rel="nofollow" target="_blank"&gt;https://github.com/xavierleune/curl-hardening&lt;/a&gt;), &lt;br&gt;
implements the same API for PHP 8.3 to 8.6. It stays inert on a PHP that &lt;br&gt;
provides the option natively.&lt;/p&gt;
&lt;p&gt;As discussed with Levi, streams are left to a separate RFC (see Future &lt;br&gt;
Scope).&lt;/p&gt;
&lt;p&gt;Thanks to everyone who took part in the previous thread and reviewed the &lt;br&gt;
PRs. Feedback is welcome.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Xavier&lt;/p&gt;
</description><guid>CAKNL=FfF-nknj8itREKhFx6DqjrsbiXcuDVdcVc31movnDBLhA@mail.gmail.com</guid><pubDate>Thu, 12 Nov 2026 10:42:54 +0000</pubDate></item><item><title>[RFC] [Discussion] Query Parameter Manipulation Support</title><link>https://externals.io/message/133084</link><description>&lt;p&gt;Hi Maté,&lt;/p&gt;
&lt;p&gt;I was reviewing your Query Parameter RFC as I was also checking the new CSV &lt;br&gt;
extension RFC around Type Conversion and I see that currently at least the &lt;br&gt;
following behaviour around float &lt;br&gt;
will be changed.&lt;/p&gt;
&lt;p&gt;$data = [ &lt;br&gt;
'a' =&amp;gt; 0.000000000000034, &lt;br&gt;
'b' =&amp;gt; 1.0, &lt;br&gt;
'c' =&amp;gt; 1e-10, &lt;br&gt;
];&lt;/p&gt;
&lt;p&gt;echo http_build_query($data), PHP_EOL; &lt;br&gt;
// a=3.4E-14&amp;amp;b=1&amp;amp;c=1.0E-10 &lt;br&gt;
echo json_encode($data); &lt;br&gt;
// {&amp;quot;a&amp;quot;:3.4e-14,&amp;quot;b&amp;quot;:1,&amp;quot;c&amp;quot;:1.0e-10}&lt;/p&gt;
&lt;p&gt;with the browsers implementations using URLSearchParams I get&lt;/p&gt;
&lt;p&gt;const q = new URLSearchParams({ &lt;br&gt;
'a': 0.000000000000034, &lt;br&gt;
'b': 1.0, &lt;br&gt;
'c': 1e-10, &lt;br&gt;
}); &lt;br&gt;
console.log(q.toString()) &lt;br&gt;
// a=3.4e-14&amp;amp;b=1&amp;amp;c=1e-10&lt;/p&gt;
&lt;p&gt;Maybe the conversion rules difference Uppercase/lowercase for &lt;br&gt;
scientific notation regarding floats should be expressed in the RFC &lt;br&gt;
to avoid surprises.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
</description><guid>CAOV5rgYcsNxrU8Axs-if2Ce-jN7d9Puy1GWRnsHg7Fvj=KkABQ@mail.gmail.com</guid><pubDate>Thu, 12 Nov 2026 08:40:30 +0000</pubDate></item><item><title>GitHub access request</title><link>https://externals.io/message/133083</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I would like access to php-src in GitHub. &lt;br&gt;
We had a short internal discourse and feel it might be a bit early.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thank you for your answer.&lt;/p&gt;
&lt;p&gt;It seems to me that the bottleneck in PHP development is reviewing and merging PRs. There are many PRs open. When I create a PR it is pretty difficult to get someone to review and merge it. When I find a bug there is a good chance that a PR already exists and is being ignored. I feel like creating new PRs is not very valuable, if they end up on the pile of unreviewed and unmerged PRs.&lt;/p&gt;
&lt;p&gt;I asked for GitHub access to reduce this problem. At least I could merge my own PRs, and help reducing the pile of existing PRs.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Sjoerd Langkemper&lt;/p&gt;
</description><guid>c1f1f745-054e-4e95-8c47-9e053bc4f8eb@app.fastmail.com</guid><pubDate>Thu, 12 Nov 2026 07:59:05 +0000</pubDate></item><item><title>GitHub access request</title><link>https://externals.io/message/133082</link><description>&lt;p&gt;Hi Sjoerd&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I would like access to php-src in GitHub. I would like to merge my own &lt;br&gt;
approved pull requests, and review other people's pull requests. I &lt;br&gt;
have previously done some work on the curl extension and I think it &lt;br&gt;
would be a good idea to register myself as code owner for that &lt;br&gt;
extension, so that I can review merge requests related to curl.&lt;/p&gt;
&lt;p&gt;There's a form to request access, but it gave an error since I already &lt;br&gt;
have a PHP account (sjoerd). My GitHub username is Sjord.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sorry for the long delay.&lt;/p&gt;
&lt;p&gt;We had a short internal discourse and feel it might be a bit early. I &lt;br&gt;
see you've opened more PRs recently, which is great. The majority of &lt;br&gt;
those target master, for which the burden of merging is very small.&lt;/p&gt;
&lt;p&gt;Git access makes most sense when you either:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;send lots of PRs to stable branches, for which the merge process is &lt;br&gt;
more involved.&lt;/li&gt;
&lt;li&gt;can meaningfully review and merge PRs autonomously and with &lt;br&gt;
confidence that changes are correct.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We already feel that we've given out git karma too early in the past. &lt;br&gt;
When something is proposed and reviewed by two newer contributors, it's &lt;br&gt;
very hard to have an overview of what happens in the codebase.&lt;/p&gt;
&lt;p&gt;I haven't handled many of your PRs, so if there's somebody else who &lt;br&gt;
might see things differently, feel free to have them reach out to me.&lt;/p&gt;
&lt;p&gt;Ilija&lt;/p&gt;
</description><guid>b355c473-cf4d-42ef-b528-6dba07ae3224@gmail.com</guid><pubDate>Wed, 11 Nov 2026 21:52:11 +0000</pubDate></item><item><title>[RFC] Scope</title><link>https://externals.io/message/133081</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi Larry, Côme, Rowan, Kévin,&lt;/p&gt;
&lt;p&gt;A question of direction, since all of you have touched it from different &lt;br&gt;
sides.&lt;/p&gt;
&lt;p&gt;The RFC today is deliberately the small end of something we know the &lt;br&gt;
full size of: Swerve (0.2, in release candidates) runs concurrent &lt;br&gt;
requests on top of the CLI SAPI with all of it isolated per request, &lt;br&gt;
through ext-scope and the phasync extension. Beyond the superglobals, &lt;br&gt;
the session, the locale and the timezone that the RFC covers, that means &lt;br&gt;
the whole of the request info (method, URI, query string, content type &lt;br&gt;
and length, cookies, auth), the request body and uploaded files, &lt;br&gt;
filter's raw input, REQUEST_TIME, and on the output side the &lt;br&gt;
output-buffer stack, zlib's compression state, the header list with &lt;br&gt;
headers_sent and the header callback, connection_status, and the &lt;br&gt;
shutdown functions. The output half is not just state to swap: it needs &lt;br&gt;
a per-request sink, which means a request/response contract that the &lt;br&gt;
server implements, with write, read, send headers and flush. Error &lt;br&gt;
handlers, &lt;code&gt;ini_set()&lt;/code&gt; values, the last-error functions, &lt;code&gt;setlocale()&lt;/code&gt;, &lt;br&gt;
&lt;code&gt;chdir()&lt;/code&gt;, statics and $GLOBALS stay shared in that design too.&lt;/p&gt;
&lt;p&gt;Two ways to get there from here:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Minimal, then opt in over time. Scope is an identity, and isolation &lt;br&gt;
is requested per concern with a bitmask, new Scope(isolate: &lt;br&gt;
Scope::REQUEST | Scope::TIMEZONE); an isolated concern starts fresh, an &lt;br&gt;
unisolated one is shared with the creator, and the engine gives core and &lt;br&gt;
extensions enter/leave hooks per bit so each owns its part. Later RFCs &lt;br&gt;
add bits; code that never asked for a bit is never affected by it, which &lt;br&gt;
I think answers both Larry's landmine and Côme's question. Scope::ALL &lt;br&gt;
means everything this version can isolate and grows like E_ALL. This RFC &lt;br&gt;
would define the mechanism and the first bits.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All in. The same mechanism, plus the request and response contract &lt;br&gt;
and the input/output bits, in one RFC. It is the complete picture, and &lt;br&gt;
it is the concurrent counterpart of Kévin's request lifecycle hooks, so &lt;br&gt;
the two could be designed together. It is also a much larger jump, and a &lt;br&gt;
much larger discussion.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I am not against the second; I started small because the first step is &lt;br&gt;
the one that has to be in the engine, and the rest can follow once it is &lt;br&gt;
in. But if you would rather see the whole shape before voting on any of &lt;br&gt;
it, I'd rather hear that now than after the vote opens.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Frode Børli&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Proper sizing of an RFC is a hotly debated topic, and if you ask 5 core devs you'll get 12 different answers. :-)&lt;/p&gt;
&lt;p&gt;My own stance is that you should at the very least design the &amp;quot;full picture,&amp;quot; even if you break it up into pieces to implement.  For example, the aviz and property hooks RFCs were designed and written together, and some syntax choices in one were essentially dictated by the knowledge that we were planning to have the other.  That meant that the two features &amp;quot;clicked together&amp;quot; much more naturally, even though we split it into two RFCs that could both justify themselves.  (Whereas properties on interfaces didn't really make any sense on their own, unless accompanied by aviz and/or hooks, so we didn't split that off.)&lt;/p&gt;
&lt;p&gt;In this case, for example, by my count you list 21 pieces of ambient state that need to be addressed for the full picture.  So if they're all opt-in, that means we have 21 different bit flags (22 if you count ALL) to opt into.  That seems... problematic, just from a DX perspective.  Some of them may be coupled together as a single flag, but it's still a big list.  So, knowing that the list is large, designing it as a piecemeal opt-in seems like a poor design, particularly since, eventually, the intent is that most code will want to use everything, meaning most scope calls will need to throw in the ALL flag, even if by then that should be the default.&lt;/p&gt;
&lt;p&gt;So I think a key question to ask is, IF we add more ambient state over time, what is the impact on existing code?  (This relates back to my previous email.)  Suppose, for example, we have a class written against a minimal implementation that is just the core scope object and the HTTP superglobals, which in turn calls legacy code from before scopes exist that uses the HTTP superglobals.  Now we add the default timezone to the ambient state that a scope isolates.  What's the fallout?  My thinking is that if the ambient state always clones, then the fallout is near-zero.  If that class has a &lt;code&gt;new DateTime()&lt;/code&gt; in it, and the scope class it happens to be running in never mentions the default timezone, then it will get a copy of the default timezone and nothing changes.&lt;/p&gt;
&lt;p&gt;If it tries to reset the default timezone, then the behavior changes as the new value only persists as long as the scope.  But that's literally the point, so that seems OK to me.&lt;/p&gt;
&lt;p&gt;So it feels to me (as I am thinking aloud) that &amp;quot;always clone ambient state&amp;quot; would allow us to transparently add more things to the list of affected ambient state in future RFCs without disruption, which would lead to nice small RFCs that people like.  However, I may be wrong in my assumption that it would &amp;quot;just work&amp;quot;, particularly as relates to the output state.  So thinking through and planning out what the output state impact would be if added separately in a follow up is a worthwhile exercise, which will both give you the design of that feature in the future and help inform if it even can be in the future or not.&lt;/p&gt;
&lt;p&gt;Another possibility is to design and vote at once but implement in chunks.  Eg, there's no RFC for every resource that gets converted to a normal object, because the decision was accepted years ago that we would do it as possible, so it's been done as-possible.  It may be viable to include in the initial RFC a complete list of everything that will, eventually, get scope-bound, but explicitly say that it will dribble in over time via many PRs.  That may be a good way to simplify the process rather than having 21 separate RFCs, which just from a process POV will take years and I don't think benefits anyone.  (Core maintainers like Ilija and Arnaud are free to tell me to shut up on this point if they disagree with this approach.)&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>68bf11f6-fded-4a21-a0e2-b0be40997224@app.fastmail.com</guid><pubDate>Wed, 11 Nov 2026 20:18:37 +0000</pubDate></item><item><title>[RFC] Sunset PECL</title><link>https://externals.io/message/133080</link><description>&lt;blockquote&gt;
&lt;p&gt;Maintainers can remove existing releases (it's hidden somewhere), and &lt;br&gt;
admins, like me, can remove any existing release.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ah I figured that might be the case!&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;a mitigation contingency to this risk: if a serious vulnerability is &lt;br&gt;
identified in a listed static package, we remove the affected &lt;br&gt;
package version(s) manually.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;That would require hacking some XML and removing files, but it can be &lt;br&gt;
done. But as the period is only 6 months, then that is not a large &lt;br&gt;
problem.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yeah that's what I was hoping; even if it's just a bit of manual work to remove them, 6 months is hopefully not too long a period to manage any potential risks that surface.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;reduce the overall timeline to 1yr, bring forward all the 2029 &lt;br&gt;
dates to 2027. That's 6 months of &amp;quot;heads up&amp;quot;, and 6 months of &amp;quot;read &lt;br&gt;
only mode plus brownouts&amp;quot; before shutdown ad the end of 2027.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ah sorry - misread, but I do think reducing to 6 months of read-only phase will minimise the surface risk that Rowan pointed out, and also minimise any potential manual work we might to carry out to manage vulnerabilities.&lt;/p&gt;
&lt;p&gt;I've updated the RFC wording accordingly to mention the approach to mitigate any potential vulnerability risks, and reduce the timeline to one year overall.&lt;/p&gt;
&lt;p&gt;Thanks folks, &lt;br&gt;
James&lt;/p&gt;
</description><guid>3ee25fb9-8ff4-450a-bdba-b76d76a91d07@app.fastmail.com</guid><pubDate>Wed, 11 Nov 2026 20:00:32 +0000</pubDate></item><item><title>[RFC] Scope</title><link>https://externals.io/message/133079</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi Larry, Côme,&lt;/p&gt;
&lt;p&gt;Thanks for pressing on this; I'd rather fix it in the RFC than find it &lt;br&gt;
in the vote.&lt;/p&gt;
&lt;p&gt;One clarification first, because I think it narrows the problem: a scope &lt;br&gt;
only affects the code that runs inside it, and the only one who can run &lt;br&gt;
your function inside a scope is a caller of yours. That caller can &lt;br&gt;
already clear $_GET before calling you and restore it after, or change &lt;br&gt;
the default timezone for the duration of the call. A scope gives them &lt;br&gt;
nothing they could not do today, except that what the inner code changes &lt;br&gt;
cannot leak back out. So &amp;quot;someone created a scope 40 calls up the stack&amp;quot; &lt;br&gt;
has the same blast radius as &amp;quot;someone cleared the superglobals 40 calls &lt;br&gt;
up the stack&amp;quot;: a bug in that caller, not a new way for code to run with &lt;br&gt;
state it was not given.&lt;/p&gt;
&lt;p&gt;What that leaves, and what I take from both of you, is that there are &lt;br&gt;
two reasons to create a scope and the RFC only serves one. A server &lt;br&gt;
creates a scope to start a new unit of work, and there starting empty is &lt;br&gt;
right. A test, a plugin host or a sandbox creates a scope to guard the &lt;br&gt;
current state from the inner code, and there the inner code should see &lt;br&gt;
what the creator sees, now and after any later RFC adds to what follows &lt;br&gt;
the scope. I intend to add that second case: a scope that starts as a &lt;br&gt;
copy of its creator's request arrays and current locale and timezone, so &lt;br&gt;
that code which guards inherits, and a later move changes only what &lt;br&gt;
&amp;quot;fresh&amp;quot; means, which concerns the servers.&lt;/p&gt;
&lt;p&gt;Before I write it up I'd like your view on the shape of it. Should &lt;br&gt;
inherit be the default of new Scope(), with the servers asking &lt;br&gt;
explicitly for a fresh one, or the other way around? Is a shallow copy &lt;br&gt;
of the arrays what you'd expect, or should the inherited scope share &lt;br&gt;
them with its creator? And is there anything else in the &amp;quot;missing &lt;br&gt;
ambient state&amp;quot; category that you'd want covered by the same rule?&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Frode Børli&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Just to make sure we're talking about the same thing, let me offer a more concrete and realistic example.&lt;/p&gt;
&lt;p&gt;Older frameworks very often had something like this:&lt;/p&gt;
&lt;p&gt;function show_flash_messages() { &lt;br&gt;
if ($_GET['show'] === 1) { &lt;br&gt;
foreach ($_SESSION['flash'] ?? [] as $msg) { &lt;br&gt;
print &amp;quot;&amp;lt;p&amp;gt;$msg&amp;lt;/p&amp;gt;\n&amp;quot;; &lt;br&gt;
} &lt;br&gt;
$_SESSION['flash'] = []; &lt;br&gt;
} &lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;Modern frameworks tend to have additional layers built on top, but they all eventually bottom out to essentially that logic.  (OK, the $_GET is a bit contrived for this example, bear with me.)&lt;/p&gt;
&lt;p&gt;Assuming a request scope created by a persisted process server (Swerve, FrankenPHP, Swoole, etc), it's probably a safe bet that $_GET and $_SESSION have been cloned, reset, or otherwise setup &amp;quot;properly,&amp;quot; for some definition of properly.  That means this pre-scope-era code continues to work.&lt;/p&gt;
&lt;p&gt;My concern is when anyone else creates a Scope (whether we think they should or not), and then calls a function chain that ends up calling show_flash_messages().  That person didn't bother to set up $_GET and $_SESSION, because they didn't even realize show_flash_messages() would be called.  So now what happens?&lt;/p&gt;
&lt;p&gt;My point is that it should still continue to work, as close as possible to were there no scopes involved.  To me, cloning all ambient state first, and then letting the person setting up the scope decide what to override, seems like the safest default.  Simply inheriting and using the creator's values (so that modifying $_GET inside the scope does impact outside the scope) seems unwise to me.  That's a great way for changes to leak unexpectedly.  And I'm not entirely sure what the use case is for starting a scope &amp;quot;empty&amp;quot;, but perhaps that exists.  So I would default to a shallow clone of the ambient state, so that changes do not escape but code that relies on the ambient state that isn't scope-aware still works.  Whether the other two options have enough of a use case to be opted-in to, I'm not sure.&lt;/p&gt;
&lt;p&gt;I'll address the &amp;quot;missing ambient state&amp;quot; part in reply to your other email.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>7383a915-555e-4530-80e8-6700b6147266@app.fastmail.com</guid><pubDate>Wed, 11 Nov 2026 19:59:53 +0000</pubDate></item><item><title>[RFC] Scope</title><link>https://externals.io/message/133078</link><description>&lt;p&gt;Hi Larry, Côme, Rowan, Kévin,&lt;/p&gt;
&lt;p&gt;A question of direction, since all of you have touched it from different &lt;br&gt;
sides.&lt;/p&gt;
&lt;p&gt;The RFC today is deliberately the small end of something we know the &lt;br&gt;
full size of: Swerve (0.2, in release candidates) runs concurrent &lt;br&gt;
requests on top of the CLI SAPI with all of it isolated per request, &lt;br&gt;
through ext-scope and the phasync extension. Beyond the superglobals, &lt;br&gt;
the session, the locale and the timezone that the RFC covers, that means &lt;br&gt;
the whole of the request info (method, URI, query string, content type &lt;br&gt;
and length, cookies, auth), the request body and uploaded files, &lt;br&gt;
filter's raw input, REQUEST_TIME, and on the output side the &lt;br&gt;
output-buffer stack, zlib's compression state, the header list with &lt;br&gt;
headers_sent and the header callback, connection_status, and the &lt;br&gt;
shutdown functions. The output half is not just state to swap: it needs &lt;br&gt;
a per-request sink, which means a request/response contract that the &lt;br&gt;
server implements, with write, read, send headers and flush. Error &lt;br&gt;
handlers, &lt;code&gt;ini_set()&lt;/code&gt; values, the last-error functions, &lt;code&gt;setlocale()&lt;/code&gt;, &lt;br&gt;
&lt;code&gt;chdir()&lt;/code&gt;, statics and $GLOBALS stay shared in that design too.&lt;/p&gt;
&lt;p&gt;Two ways to get there from here:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Minimal, then opt in over time. Scope is an identity, and isolation &lt;br&gt;
is requested per concern with a bitmask, new Scope(isolate: &lt;br&gt;
Scope::REQUEST | Scope::TIMEZONE); an isolated concern starts fresh, an &lt;br&gt;
unisolated one is shared with the creator, and the engine gives core and &lt;br&gt;
extensions enter/leave hooks per bit so each owns its part. Later RFCs &lt;br&gt;
add bits; code that never asked for a bit is never affected by it, which &lt;br&gt;
I think answers both Larry's landmine and Côme's question. Scope::ALL &lt;br&gt;
means everything this version can isolate and grows like E_ALL. This RFC &lt;br&gt;
would define the mechanism and the first bits.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;All in. The same mechanism, plus the request and response contract &lt;br&gt;
and the input/output bits, in one RFC. It is the complete picture, and &lt;br&gt;
it is the concurrent counterpart of Kévin's request lifecycle hooks, so &lt;br&gt;
the two could be designed together. It is also a much larger jump, and a &lt;br&gt;
much larger discussion.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I am not against the second; I started small because the first step is &lt;br&gt;
the one that has to be in the engine, and the rest can follow once it is &lt;br&gt;
in. But if you would rather see the whole shape before voting on any of &lt;br&gt;
it, I'd rather hear that now than after the vote opens.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Frode Børli&lt;/p&gt;
</description><guid>AS8PR08MB7339E74C8B29C86DF9E3ACD5D9712@AS8PR08MB7339.eurprd08.prod.outlook.com</guid><pubDate>Wed, 11 Nov 2026 16:48:28 +0000</pubDate></item><item><title>[RFC] Scope</title><link>https://externals.io/message/133077</link><description>&lt;p&gt;Hi Larry, Côme,&lt;/p&gt;
&lt;p&gt;Thanks for pressing on this; I'd rather fix it in the RFC than find it &lt;br&gt;
in the vote.&lt;/p&gt;
&lt;p&gt;One clarification first, because I think it narrows the problem: a scope &lt;br&gt;
only affects the code that runs inside it, and the only one who can run &lt;br&gt;
your function inside a scope is a caller of yours. That caller can &lt;br&gt;
already clear $_GET before calling you and restore it after, or change &lt;br&gt;
the default timezone for the duration of the call. A scope gives them &lt;br&gt;
nothing they could not do today, except that what the inner code changes &lt;br&gt;
cannot leak back out. So &amp;quot;someone created a scope 40 calls up the stack&amp;quot; &lt;br&gt;
has the same blast radius as &amp;quot;someone cleared the superglobals 40 calls &lt;br&gt;
up the stack&amp;quot;: a bug in that caller, not a new way for code to run with &lt;br&gt;
state it was not given.&lt;/p&gt;
&lt;p&gt;What that leaves, and what I take from both of you, is that there are &lt;br&gt;
two reasons to create a scope and the RFC only serves one. A server &lt;br&gt;
creates a scope to start a new unit of work, and there starting empty is &lt;br&gt;
right. A test, a plugin host or a sandbox creates a scope to guard the &lt;br&gt;
current state from the inner code, and there the inner code should see &lt;br&gt;
what the creator sees, now and after any later RFC adds to what follows &lt;br&gt;
the scope. I intend to add that second case: a scope that starts as a &lt;br&gt;
copy of its creator's request arrays and current locale and timezone, so &lt;br&gt;
that code which guards inherits, and a later move changes only what &lt;br&gt;
&amp;quot;fresh&amp;quot; means, which concerns the servers.&lt;/p&gt;
&lt;p&gt;Before I write it up I'd like your view on the shape of it. Should &lt;br&gt;
inherit be the default of new Scope(), with the servers asking &lt;br&gt;
explicitly for a fresh one, or the other way around? Is a shallow copy &lt;br&gt;
of the arrays what you'd expect, or should the inherited scope share &lt;br&gt;
them with its creator? And is there anything else in the &amp;quot;missing &lt;br&gt;
ambient state&amp;quot; category that you'd want covered by the same rule?&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Frode Børli&lt;/p&gt;
</description><guid>AS8PR08MB73398E58E9045990F34F0027D9712@AS8PR08MB7339.eurprd08.prod.outlook.com</guid><pubDate>Wed, 11 Nov 2026 16:04:22 +0000</pubDate></item><item><title>[RFC] Scope</title><link>https://externals.io/message/133076</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi Côme,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If suddenly scope starts to clear headers, ini_set or whatever, all existing code using it will break?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Nothing is cleared, in this RFC or in a later one. When a piece of &lt;br&gt;
state follows the scope, each scope has its own instance of it. The &lt;br&gt;
root scope keeps the process state exactly as it is today, so code that &lt;br&gt;
never creates a scope, which is all code written before this RFC, sees &lt;br&gt;
no change, now or later.&lt;/p&gt;
&lt;p&gt;Code that runs inside a non-root scope is also meant to keep working as &lt;br&gt;
it does today. That is one of the purposes of Scope: legacy code should &lt;br&gt;
keep working in a long-running server without being rewritten. Take &lt;br&gt;
vote B: code that calls Locale::setDefault() for user X and later &lt;br&gt;
Locale::getDefault() does so within one request, and both calls happen &lt;br&gt;
in the same scope, so it gets the locale it set. What changes is that a &lt;br&gt;
request for user Y, running in another scope, no longer sees X's &lt;br&gt;
locale. From the point of view of the code, nothing changed; it just &lt;br&gt;
stopped being affected by other requests.&lt;/p&gt;
&lt;p&gt;The reason this holds is where scopes are switched. Code does not &lt;br&gt;
switch scope while it is processing one request. Scopes are switched &lt;br&gt;
between requests, by the SAPI or the application server, which is also &lt;br&gt;
the party that has the request to put into the new scope. The parallel &lt;br&gt;
work a request starts stays in the request, through fibers, which &lt;br&gt;
follow the scope. Larry's legacyLogic() example creates a scope in the &lt;br&gt;
middle of a request and then expects the request's data to still be &lt;br&gt;
there; that is not what run() is for, and I'll make that more explicit &lt;br&gt;
in the RFC.&lt;/p&gt;
&lt;p&gt;Each later move is still its own RFC, with its own BC section and vote; &lt;br&gt;
the Future Scope list states the direction, so that servers and &lt;br&gt;
frameworks creating scopes know it before they write that code. What &lt;br&gt;
this RFC fixes now is the rule they would all follow: a scope has its &lt;br&gt;
own instance of the state that follows it, and the root keeps what the &lt;br&gt;
process has today.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Frode Børli&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I think there's an implicit assumption you're making here that is not safe to make.&lt;/p&gt;
&lt;p&gt;Specifically, you're focused on the request scope use case.  I agree, that's the most obvious place for it to apply, and the likely most common.  And the 2-3 libraries that make a request scope (FrankenPHP, Revolt, Swoole, etc.) that other people build off of can probably be expected to get it right (for whatever &amp;quot;right&amp;quot; means).&lt;/p&gt;
&lt;p&gt;However, there is nothing in the design of the RFC that limits it to being used just for the request, and only by a select number of very careful projects.  It can be created by literally anyone, anywhere, at any time, whether we think it's a good idea or not.  Which means I can guarantee it &lt;em&gt;will&lt;/em&gt; be created by someone, somewhere, at some time that is bad idea, and sloppily.&lt;/p&gt;
&lt;p&gt;So literally any function that reads the super globals today &lt;em&gt;could&lt;/em&gt; end up in a scope created by someone other than FrankenPHP that doesn't manually clone the superglobals, and therefore will break.  That it's not a responsibly created request-bound scope is irrelevant, because not all scopes will conform to that lifecycle.&lt;/p&gt;
&lt;p&gt;The same applies for any other &amp;quot;ambient state&amp;quot; that becomes scope-aware.  If the pattern is that a new Scope starts with a blank ambient state, and it's the caller's job to populate it, then every time new parts of the ambient state become scope-aware, the required manual setup code changes.  That creates a BC break every single time more ambient state is added.  That simply won't fly.&lt;/p&gt;
&lt;p&gt;Instead, if the scope-aware ambient state starts as a clone of the originating scope, then in most cases code doesn't care.  That it's now working with a copy of $_GET, or a scope-bound default locale, or scope-bound default timezone is irrelevant in the 99% case.  But it shouldn't have to deal with &amp;quot;whelp, someone made a new scope 40 function calls up the stack, so now the ambient state is missing.&amp;quot;  Missing ambient state is a fatal waiting to happen.&lt;/p&gt;
&lt;p&gt;Even then, there's still a small BC concern if some existing code is setting the ambient state, and expecting it to persist for the entire process lifetime instead of just the current scope lifetime.  However, the surface area for that is orders of magnitude smaller than &amp;quot;All code needs to consider that $_GET might not be set at all now, sorry.&amp;quot;&lt;/p&gt;
&lt;p&gt;This is a landmine large enough that it would keep me from supporting this RFC, which I otherwise quite like.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>b5d06820-bf43-467e-aebb-18249d9f05c8@app.fastmail.com</guid><pubDate>Wed, 11 Nov 2026 15:03:31 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133075</link><description>&lt;blockquote&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Le jeudi 5 novembre 2026, 18:33:14 heure normale d’Europe centrale &lt;br&gt;
Larry Garfield a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi folks.  Based on the feedback and problems with the previous Context Managers RFC, Arnaud and I have a new approach to present:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/context-managers-v2" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/context-managers-v2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It basically swaps the two-method approach in favor of &amp;quot;it's a generator, you're welcome.&amp;quot;  The result is, I think, both simpler and more flexible, and resolves a number of other issues as well.  More details in the RFC.&lt;/p&gt;
&lt;p&gt;There is a linked implementation, though Arnaud warns it's only partially complete so go easy on it. :-)  But the design in the RFC is all ready for review.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I do not understand this sentence: «Additionally, it is legal for a &lt;br&gt;
Context Manager object to return $this as the context variable if that &lt;br&gt;
is appropriate in the specific use case.» &lt;br&gt;
If ContextManager::getContextManager returns $this, which Generator is &lt;br&gt;
used 🤔&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That should read &amp;quot;yield $this&amp;quot;.  Like so:&lt;/p&gt;
&lt;p&gt;class Foo implements ContextManager { &lt;br&gt;
public function getContextManager(): \Generator &lt;br&gt;
{ &lt;br&gt;
yield $this; &lt;br&gt;
{ &lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;In which case the context variable will be an instance of Foo.  I'll adjust the language.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The whole section «Mixing with try-catch» is also a mystery to me. I do &lt;br&gt;
not understand why &amp;quot;using&amp;quot; would need a short syntax for try catch any &lt;br&gt;
more than any other keyword we often put in a try/catch, nor what the &lt;br&gt;
explanations in there mean.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As stated in the RFC, we expect doing this to be very common:&lt;/p&gt;
&lt;p&gt;function something(): \Generator &lt;br&gt;
{ &lt;br&gt;
try { &lt;br&gt;
$something = init_something(); &lt;br&gt;
yield $something; &lt;br&gt;
} finally { &lt;br&gt;
deinit($something); &lt;br&gt;
} &lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;try { &lt;br&gt;
using (something() =&amp;gt; $var) { &lt;br&gt;
// Do stuff with $var. &lt;br&gt;
}; &lt;br&gt;
} catch (\Exception $e) { &lt;br&gt;
// Additional error handling, but we don't need to clean up $something. That's already handled. &lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;So the short-hand form just lets us reduce the nesting a bit for a common case.  One could make an argument that we could support arbitrary single-expression try statements this way; I'd be open to that myself, but that's out of scope for this RFC.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Is the semi-colon necessary after the closing '}' ? That reads weird, &lt;br&gt;
it’s not clear to me why it’s not a single '}' like after an if or &lt;br&gt;
foreach or whatever.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Because using() is an expression, like match() or an anonymous function.  Those have semicolons after them as well, because they're not a complete statement, just an expression.  The same applies here.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Also, this semi-colon is missing in at least one example.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which one?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In the transaction example, $conn does not exist, I suppose both &lt;br&gt;
instances should be $this?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You are correct, fixed.  Thanks.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;«A return statement inside the BODY will return from the function the &lt;br&gt;
code is currently executing in. A finally block in the generator &lt;br&gt;
context manager will still be executed, but otherwise control returns &lt;br&gt;
to the function's caller.» &lt;br&gt;
This is also hard to get for me. &lt;br&gt;
Can you detail what this would output: &lt;br&gt;
function &lt;code&gt;context()&lt;/code&gt;: \Generator { &lt;br&gt;
echo &amp;quot;A\n&amp;quot;; &lt;br&gt;
yield &amp;quot;B&amp;quot;; &lt;br&gt;
echo &amp;quot;C\n&amp;quot;; &lt;br&gt;
return &amp;quot;D&amp;quot;; &lt;br&gt;
} &lt;br&gt;
var_dump( &lt;br&gt;
using (context() =&amp;gt; $c) { &lt;br&gt;
echo &amp;quot;E\n&amp;quot;; &lt;br&gt;
return &amp;quot;F&amp;quot;; &lt;br&gt;
} &lt;br&gt;
);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I believe (without actually running it) that would output:&lt;/p&gt;
&lt;p&gt;A &lt;br&gt;
E&lt;/p&gt;
&lt;p&gt;The return &amp;quot;F&amp;quot; terminates the function that the &lt;code&gt;var_dump()&lt;/code&gt;/using() construct is in.  The generator is discarded without ever reaching its end, so the generator's return statement is never reached.&lt;/p&gt;
&lt;p&gt;That said, you have brought up an interesting question, I have no idea what happens when you &lt;code&gt;var_dump()&lt;/code&gt; a compound expression like this that returns.  Something for Arnaud to write tests for. 0:-)&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>b2fdaf2b-253b-4b8d-910b-2c4b273e5682@app.fastmail.com</guid><pubDate>Wed, 11 Nov 2026 14:46:12 +0000</pubDate></item><item><title>LoongArch64 backend for the OPcache JIT</title><link>https://externals.io/message/133074</link><description>&lt;p&gt;Hello internals,&lt;/p&gt;
&lt;p&gt;I would like to raise the question of adding a LoongArch64 backend to the &lt;br&gt;
OPcache JIT, and to ask for guidance before writing any substantial amount of &lt;br&gt;
code.&lt;/p&gt;
&lt;p&gt;Status today (PHP 8.5 / master):&lt;/p&gt;
&lt;p&gt;  - ext/opcache/config.m4 gates the JIT on the host CPU:&lt;/p&gt;
&lt;p&gt;      AS_CASE([$host_cpu], &lt;br&gt;
        [[i[34567]86*|x86*|aarch64|amd64]], [], &lt;br&gt;
        [AC_MSG_WARN([JIT not supported by host architecture]) &lt;br&gt;
         PHP_OPCACHE_JIT=no])&lt;/p&gt;
&lt;p&gt;    On loongarch64 this silently disables --enable-opcache-jit.&lt;/p&gt;
&lt;p&gt;  - ext/opcache/jit/ir/ contains ir_x86.dasc (~930 KB) and ir_aarch64.dasc &lt;br&gt;
    (~328 KB) and their headers. There is no ir_loongarch64.dasc.&lt;/p&gt;
&lt;p&gt;  - The bundled DynASM provides dasm_arm, dasm_arm64, dasm_mips, dasm_ppc &lt;br&gt;
    and dasm_x86/x64, but no LoongArch64 target, so a backend needs a &lt;br&gt;
    DynASM target first.&lt;/p&gt;
&lt;p&gt;  - Fibers already work on LoongArch64 (make_loongarch64_sysv_elf_gas.S and &lt;br&gt;
    jump_loongarch64_sysv_elf_gas.S under Zend/asm/, plus loongarch64 in &lt;br&gt;
    &lt;a href="http://configure.ac" rel="nofollow" target="_blank"&gt;configure.ac&lt;/a&gt;), so the LP64D calling convention is already used in-tree.&lt;/p&gt;
&lt;p&gt;  - PCRE2's SLJIT has a LoongArch64 backend (sljitNativeLOONGARCH_64.c), so &lt;br&gt;
    pcre.jit=1 reports &amp;quot;PCRE JIT Target =&amp;gt; LOONGARCH 64bit&amp;quot;. The gap is &lt;br&gt;
    specific to the Zend JIT, not to the platform.&lt;/p&gt;
&lt;p&gt;Why it matters: LoongArch64 is a supported Linux target for several &lt;br&gt;
distributions (Debian loong64 ports, AOSC OS, Loongnix) and the hardware &lt;br&gt;
family (3A6000, 3B6000, 3C6000) is used as desktop and server hardware. PHP is &lt;br&gt;
a mainstream workload there, and without the JIT these systems are &lt;br&gt;
structurally 10-30% behind on JIT-friendly code. Frequency scaling is also &lt;br&gt;
not exposed on several of these platforms, so the JIT is one of the few &lt;br&gt;
remaining single-thread levers.&lt;/p&gt;
&lt;p&gt;Scope, as far as I can tell from ir_aarch64.dasc:&lt;/p&gt;
&lt;p&gt;  1. A DynASM target: dasm_loongarch64.lua and dasm_loongarch64.h &lt;br&gt;
     (encoding tables, relocations). &lt;br&gt;
  2. ir_loongarch64.dasc and ir_loongarch64.h: all IR opcodes, register &lt;br&gt;
     constraints, calling convention, stack frames, safepoints, &lt;br&gt;
     exception/GC handling, JIT helper ABI. &lt;br&gt;
  3. Wiring in config.m4 (IR_TARGET, DASM_ARCH) and the guards in &lt;br&gt;
     zend_jit.c / zend_jit_ir.c. &lt;br&gt;
  4. Running the test matrix, e.g.&lt;/p&gt;
&lt;p&gt;       make test TESTS=&amp;quot;-d opcache.jit_buffer_size=16M -d opcache.enable=1 &lt;br /&gt;
         -d opcache.enable_cli=1 -d opcache.protect_memory=1 &lt;br /&gt;
         -d opcache.jit=tracing --repeat 2 -j$(nproc) ext/opcache Zend&amp;quot;&lt;/p&gt;
&lt;p&gt;     and the same with opcache.jit=function and opcache.jit=off.&lt;/p&gt;
&lt;p&gt;Questions:&lt;/p&gt;
&lt;p&gt;  1. Would an in-tree LoongArch64 IR backend be acceptable in principle, or &lt;br&gt;
     are JIT backends expected to stay limited to architectures the core team &lt;br&gt;
     can test and maintain? &lt;br&gt;
  2. Is there a porting checklist beyond using ir_aarch64.dasc as a reference? &lt;br&gt;
  3. Given that the legacy zend_jit_*.dasc backends were removed, is the &lt;br&gt;
     IR-based JIT (8.4+) the only sensible target? &lt;br&gt;
  4. Would an initial patch limited to the DynASM target plus a skeleton IR &lt;br&gt;
     backend (builds, passes a small opcode subset) be reviewable, or is a &lt;br&gt;
     complete backend expected before discussion?&lt;/p&gt;
&lt;p&gt;I have Loongson 3B6000M hardware (LA664, 8 cores, LSX, no LASX) running &lt;br&gt;
AOSC OS 14 and Debian loong64, and can run tests and publish benchmark &lt;br&gt;
numbers. I would prefer to agree on the approach first rather than write &lt;br&gt;
several thousand lines of assembler that upstream would not want to carry.&lt;/p&gt;
&lt;p&gt;Thanks, &lt;br&gt;
tsuibin&lt;/p&gt;
</description><guid>tencent_7BFA715D93CFECBE0986C48696C6D225D906@qq.com</guid><pubDate>Wed, 11 Nov 2026 14:07:31 +0000</pubDate></item><item><title>[RFC] Request lifecycle hooks for SAPIs with a worker mode</title><link>https://externals.io/message/133073</link><description>&lt;p&gt;Hi Florian,&lt;/p&gt;
&lt;p&gt;I updated the RFC (now 0.2) to include the lifecycle sequence.&lt;/p&gt;
&lt;p&gt;I also addressed a relevant question asked on LinkedIn &lt;br&gt;
(&lt;a href="https://www.linkedin.com/feed/update/urn:li:activity:7525919414685384704/?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A7525919414685384704%2C7525924489574899712%29&amp;amp;dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287525924489574899712%2Curn%3Ali%3Aactivity%3A7525919414685384704%29&amp;amp;skipRedirect=true" rel="nofollow" target="_blank"&gt;https://www.linkedin.com/feed/update/urn:li:activity:7525919414685384704/?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A7525919414685384704%2C7525924489574899712%29&amp;amp;dashCommentUrn=urn%3Ali%3Afsd_comment%3A%287525924489574899712%2Curn%3Ali%3Aactivity%3A7525919414685384704%29&amp;amp;skipRedirect=true&lt;/a&gt;) &lt;br&gt;
about failing hooks: php_request_begin() and php_request_end() now &lt;br&gt;
return FAILURE when a hook fails, and the SAPI should then end the &lt;br&gt;
script, as a failing RINIT ends the process.&lt;/p&gt;
&lt;p&gt;The RFC now also clarifies what happens when request-dependent &lt;br&gt;
functions are called between two logical requests: the state they set &lt;br&gt;
is released before the next request starts, and &lt;code&gt;session_start()&lt;/code&gt; and &lt;br&gt;
&lt;code&gt;session_id()&lt;/code&gt; refuse to run there.&lt;/p&gt;
&lt;p&gt;Both patches now match the RFC.&lt;/p&gt;
&lt;p&gt;Best&lt;/p&gt;
</description><guid>CADU7aotUospDyydK+9vBGYyjhvMrjytJNaGJ+mVVqSwXGzZ0jw@mail.gmail.com</guid><pubDate>Wed, 11 Nov 2026 13:29:53 +0000</pubDate></item><item><title>[RFC] Scope</title><link>https://externals.io/message/133072</link><description>&lt;p&gt;Le mardi 10 novembre 2026, 13:46:42 heure normale d’Europe centrale Frode Børli a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Nothing is cleared, in this RFC or in a later one. When a piece of state follows the scope, each scope has its own instance of it. The root scope keeps the process state exactly as it is today, so code that never creates a scope, which is all code written before this RFC, sees no change, now or later.&lt;/p&gt;
&lt;p&gt;Code that runs inside a non-root scope is also meant to keep working as it does today. That is one of the purposes of Scope: legacy code should keep working in a long-running server without being rewritten. Take vote B: code that calls Locale::setDefault() for user X and later Locale::getDefault() does so within one request, and both calls happen in the same scope, so it gets the locale it set. What changes is that a request for user Y, running in another scope, no longer sees X's locale. From the point of view of the code, nothing changed; it just stopped being affected by other requests.&lt;/p&gt;
&lt;p&gt;The reason this holds is where scopes are switched. Code does not switch scope while it is processing one request. Scopes are switched between requests, by the SAPI or the application server, which is also the party that has the request to put into the new scope. The parallel work a request starts stays in the request, through fibers, which follow the scope. Larry's legacyLogic() example creates a scope in the middle of a request and then expects the request's data to still be there; that is not what run() is for, and I'll make that more explicit in the RFC.&lt;/p&gt;
&lt;p&gt;Each later move is still its own RFC, with its own BC section and vote; the Future Scope list states the direction, so that servers and frameworks creating scopes know it before they write that code. What this RFC fixes now is the rule they would all follow: a scope has its own instance of the state that follows it, and the root keeps what the process has today.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have to say this answer does not resolve my worry. For code that will be written once the RFC is accepted, it will get broken if a future RFC adds things to what follow the scope. &lt;br&gt;
I understand that «Each later move is still its own RFC, with its own BC section and vote», but to me that means that nothing will be able to be changed later to follow the scope, as that would be too big of a BC break.&lt;/p&gt;
&lt;p&gt;Côme&lt;/p&gt;
</description><guid>4HtVuVOHSg6O7AMrr-Cl2w@chilliet.eu</guid><pubDate>Wed, 11 Nov 2026 13:06:20 +0000</pubDate></item><item><title>[RFC] Request for RFC karma</title><link>https://externals.io/message/133071</link><description>&lt;p&gt;Hi Xavier&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I'd like to request RFC karma for my PHP Wiki Account. &lt;br&gt;
Wiki username: beoneself&lt;/p&gt;
&lt;p&gt;Following the recent discussions and my previous pull requests about &lt;br&gt;
SSRF protection in curl, I plan to open a RFC to finalize the api &lt;br&gt;
around it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;RFC karma was granted. Good luck!&lt;/p&gt;
&lt;p&gt;Ilija&lt;/p&gt;
</description><guid>b7bd032e-b370-4e10-8391-7714fa11e4ef@gmail.com</guid><pubDate>Wed, 11 Nov 2026 12:28:31 +0000</pubDate></item><item><title>[RFC] Request lifecycle hooks for SAPIs with a worker mode</title><link>https://externals.io/message/133069</link><description>&lt;p&gt;Hey Kévin,&lt;/p&gt;
&lt;p&gt;Thanks, could this be documented in the RFC, because from how I read &lt;br&gt;
it, it shows the RBEGIN -&amp;gt; REND pairs inside the loop. It does not &lt;br&gt;
show the initial RINIT -&amp;gt; REND or final RBEGIN -&amp;gt; RSHUTDOWN &lt;br&gt;
transitions. &lt;br&gt;
That should be made explicit in the RFC, basically just the lifecycle &lt;br&gt;
you wrote about in your email. Another SAPI with worker mode could &lt;br&gt;
interpret the RFC as RINIT -&amp;gt; (RBEGIN -&amp;gt; REND) -&amp;gt; RSHUTDOWN. &lt;br&gt;
Otherwise, I like that we could have an explicit hook to detect &lt;br&gt;
requests handled inside a worker!&lt;/p&gt;
&lt;p&gt;Kind regards &lt;br&gt;
Florian&lt;/p&gt;
</description><guid>CAG=EydgbdcROOvX4b4ESJqZeQw_wp2kcVoaMum-T3OV8fimzHg@mail.gmail.com</guid><pubDate>Wed, 11 Nov 2026 11:04:24 +0000</pubDate></item><item><title>Floating point on 32-bit x86: x87 precision (XPFPA) and fpmath=sse</title><link>https://externals.io/message/133068</link><description>&lt;blockquote&gt;
&lt;p&gt;On 8.11.2026 15:25 CET Sjoerd Langkemper &lt;a href="mailto:sjoerd-php@linuxonly.nl"&gt;sjoerd-php@linuxonly.nl&lt;/a&gt; wrote:&lt;/p&gt;
&lt;p&gt;On Sun, Nov 8, 2026, at 14:17, &lt;a href="mailto:marc@mabe.berlin" rel="nofollow" target="_blank"&gt;marc@mabe.berlin&lt;/a&gt; &lt;a href="mailto:marc@mabe.berlin" rel="nofollow" target="_blank"&gt;mailto:marc@mabe.berlin&lt;/a&gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Can we enable &lt;code&gt;-msse2 -mfpmath=sse&lt;/code&gt; by default on x86 (require SSE2).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes. As I understand it we are not really interested in supporting actual 32 bit hardware, but running 32 bit builds on WASM or to save memory. So breaking compatibility with old CPUs seems fair.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have opened a PR to enable SSE2 and fpmath=sse on x86 by default without configure option. &lt;a href="https://github.com/php/php-src/pull/25362" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/25362&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I think Windows already requires SSE2?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Windows builds should use SSE2 via &lt;code&gt;--enable-native-intrinsics=sse2&lt;/code&gt; and should enable it for double arithmetic. I do not have windows to verify this.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Sjoerd Langkemper&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>937091969.143956.1794385075397@app.mailbox.org</guid><pubDate>Wed, 11 Nov 2026 08:17:55 +0000</pubDate></item><item><title>[RFC] CSV Extension (ext/csv)</title><link>https://externals.io/message/133067</link><description>&lt;p&gt;Hi Damian,&lt;/p&gt;
&lt;p&gt;Thanks for working on this, and for taking in so much feedback already. The RFC 4180 default, locale independence and dropping the escape character are real improvements over the current functions.&lt;/p&gt;
&lt;p&gt;I'd like to suggest a direction for the API, mainly about how options are passed. Every function currently takes $delimiter, $enclosure and $eolSequence, so callers repeat the same dialect on every call, and every future option has to be added to every signature. A small readonly value object for the format, with the RFC's current defaults, would avoid that, and an enum would make the quoting mode explicit:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;namespace Csv;

enum Quoting { case Minimal; case All; case NonNumeric; }

final readonly class Format {
    public function __construct(
        public string $delimiter = ',',
        public string $enclosure = '&amp;quot;',
        public string $eolSequence = &amp;quot;\r\n&amp;quot;,
        public Quoting $quoting = Quoting::Minimal,
    ) {}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A format object also allows new format options without changing the encoder and decoder APIs. For example, a configurable null representation to distinguish null from empty strings during round trips, or stripping a UTF-8 BOM when reading (as Excel commonly writes one).&lt;/p&gt;
&lt;p&gt;The format could then be used by two small classes that do only the encoding and decoding:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;final class Encoder {
    public function __construct(Format $format = new Format()) {}
    public function encode(array $row): string {}
}

final class Decoder {
    public function __construct(Format $format = new Format()) {}
    public function decode(string $chunk): array {}  // rows completed by this chunk
    public function finish(): array {}               // end of input: last row, validation
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The decoder accepts input in arbitrary chunks, so it works with any source (files, sockets, HTTP bodies, decompression) without needing a separate function per source.&lt;/p&gt;
&lt;p&gt;I'd deliberately keep stream and generator handling out of these classes. &amp;quot;Read a stream until EOF and decode it&amp;quot; and &amp;quot;encode everything a generator yields to a stream&amp;quot; are general patterns. A JSON Lines encoder and decoder would need exactly the same, and so would other formats later. If each format builds its own, we end up with a different streaming API per format. With minimal codecs, a later RFC could define a common interface for streaming any encoder or decoder, and CSV would get it for free.&lt;/p&gt;
&lt;p&gt;Ignace's suggestion of an enum instead of the _lax suffix could fit here as a validation mode on the decoder.&lt;/p&gt;
&lt;p&gt;I'm happy to help review or test the implementation if that's useful.&lt;/p&gt;
&lt;p&gt;Frode&lt;/p&gt;
</description><guid>AS8PR08MB733906D5126F8A0C465D0C1FD9722@AS8PR08MB7339.eurprd08.prod.outlook.com</guid><pubDate>Tue, 10 Nov 2026 19:32:48 +0000</pubDate></item><item><title>[RFC] CSV Extension (ext/csv)</title><link>https://externals.io/message/133066</link><description>&lt;blockquote&gt;
&lt;p&gt;The interface could be introduced later on, but removing  __toString &lt;br&gt;
automatic conversion should be done now. so It may look like a BC break  or &lt;br&gt;
a regression vs the current conversion rules but IMHO it would be &lt;br&gt;
beneficial in the long run. I would put the change in the same category as &lt;br&gt;
removing resource to string conversion as you did.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Ignace,&lt;/p&gt;
&lt;p&gt;I agree with your reasoning. I've updated the implementation to reject &lt;br&gt;
implicit __toString() conversions and published RFC version 1.4 to reflect &lt;br&gt;
this.&lt;/p&gt;
&lt;p&gt;I've also added the dedicated conversion interface to Future Scope. I think &lt;br&gt;
it would fit naturally alongside the potential object-oriented API, without &lt;br&gt;
expanding the scope of this RFC.&lt;/p&gt;
&lt;p&gt;Thanks again for the constructive feedback!&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian&lt;/p&gt;
</description><guid>CA+WT9YYeZFhXUG8FC2w0jnqLyKXPjo6ZhP-+FZ1b3=9m=G1Vgw@mail.gmail.com</guid><pubDate>Tue, 10 Nov 2026 17:09:19 +0000</pubDate></item><item><title>[RFC] CSV Extension (ext/csv)</title><link>https://externals.io/message/133065</link><description>&lt;p&gt;On Tue, Nov 10, 2026 at 5:31 PM Juliette Reinders Folmer &amp;lt; &lt;br&gt;
&lt;a href="mailto:php-internals_nospam@adviesenzo.nl" rel="nofollow" target="_blank"&gt;php-internals_nospam@adviesenzo.nl&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Ignace,&lt;/p&gt;
&lt;p&gt;Thanks for the suggestion. I agree that a dedicated interface for &lt;br&gt;
converting objects into CSV fields could be useful.&lt;/p&gt;
&lt;p&gt;I'd prefer to avoid the term &amp;quot;serialization&amp;quot;, as I've deliberately used &lt;br&gt;
&amp;quot;conversion&amp;quot; throughout the RFC. Something like Csv\FieldConvertible with &lt;br&gt;
a toCsvField() method would be more consistent with that terminology.&lt;/p&gt;
&lt;p&gt;There is one thing I'd like to consider before introducing it, though.&lt;/p&gt;
&lt;p&gt;The last item in the RFC's Future Scope section already mentions the &lt;br&gt;
possibility of an object-oriented API. I think a dedicated conversion &lt;br&gt;
interface would fit quite naturally into such an API.&lt;/p&gt;
&lt;p&gt;With the current function-based API, callers can already explicitly invoke &lt;br&gt;
their own conversion methods before passing values to the CSV functions:&lt;/p&gt;
&lt;p&gt;Csv\array_to_row([ &lt;br&gt;
$object-&amp;gt;toCsvField(), &lt;br&gt;
]);&lt;/p&gt;
&lt;p&gt;This provides explicit control over the CSV representation without &lt;br&gt;
requiring a new interface in the initial API.&lt;/p&gt;
&lt;p&gt;So the question, in my view, is whether we really need to introduce a &lt;br&gt;
dedicated interface now, or whether it would be better to revisit it &lt;br&gt;
alongside the potential object-oriented API, where its role and integration &lt;br&gt;
could be considered more broadly.&lt;/p&gt;
&lt;p&gt;I'm not opposed to the interface itself. I'd just prefer to avoid &lt;br&gt;
expanding the initial scope unless there's a compelling use case that the &lt;br&gt;
existing functions cannot reasonably accommodate.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian&lt;/p&gt;
&lt;p&gt;Damian,&lt;/p&gt;
&lt;p&gt;Please respect the mailing list rules [1] and always reply with a &lt;br&gt;
bottom-post. This conversation as it is currently, is impossible to follow &lt;br&gt;
with Ignace (correctly) bottom posting and you consistently incorrectly &lt;br&gt;
top-posting.&lt;/p&gt;
&lt;p&gt;Smile, &lt;br&gt;
Juliette&lt;/p&gt;
&lt;p&gt;1: &lt;a href="https://github.com/php/php-src/blob/master/docs/mailinglist-rules.md" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/blob/master/docs/mailinglist-rules.md&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Sorry about that, Juliette. I'll make sure to bottom-post from now on.&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>CA+WT9Ya6EOX+ZiEU928pcD3dSyL8iiP4B+NW4EFgjt+pDCCqAg@mail.gmail.com</guid><pubDate>Tue, 10 Nov 2026 17:00:58 +0000</pubDate></item><item><title>Request for RFC karma</title><link>https://externals.io/message/133064</link><description>&lt;p&gt;Hi Gianfrancesco&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I'd like to request RFC karma for my PHP Wiki account.&lt;/p&gt;
&lt;p&gt;Wiki username: gianfriaur&lt;/p&gt;
&lt;p&gt;I would like to start preparing the draft RFC regarding the addition &lt;br&gt;
of the new transport dtls in ext/openssl.&lt;/p&gt;
&lt;p&gt;I've opened a draft implementation PR: &lt;br&gt;
&lt;a href="https://github.com/php/php-src/pull/22638" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22638&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;the original discussion in internals: &lt;br&gt;
&lt;a href="https://news-web.php.net/php.internals/131514" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/131514&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Obviously everything has changed since the initial proposal, with &lt;br&gt;
bukka we are getting closer to the final version&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;RFC karma was granted. Good luck!&lt;/p&gt;
&lt;p&gt;Ilija&lt;/p&gt;
</description><guid>4e1bdac7-fb17-4f93-88dd-c1516f70c831@gmail.com</guid><pubDate>Tue, 10 Nov 2026 16:58:25 +0000</pubDate></item><item><title>[RFC] Sunset PECL</title><link>https://externals.io/message/133063</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;If the long static state is considered a problem, we can just &lt;br&gt;
shorten it by a year, and shutting it down a year sooner.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'd actually be fine with this. as Rowan makes a good point about &lt;br&gt;
long-time static unchanging deps.&lt;/p&gt;
&lt;p&gt;I'm wondering if that's actually already the case. I don't see a way &lt;br&gt;
(at least with my permissions) to remove an existing release from PECL &lt;br&gt;
in the instance it's deemed vulnerable.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Maintainers can remove existing releases (it's hidden somewhere), and &lt;br&gt;
admins, like me, can remove any existing release.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If that's the case the biggest impact in that particular instance is &lt;br&gt;
new releases that fix any vulnerabilities would only be available &lt;br&gt;
through PIE.&lt;/p&gt;
&lt;p&gt;I would suggest two changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a mitigation contingency to this risk: if a serious vulnerability is &lt;br&gt;
identified in a listed static package, we remove the affected &lt;br&gt;
package version(s) manually.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;That would require hacking some XML and removing files, but it can be &lt;br&gt;
done. But as the period is only 6 months, then that is not a large &lt;br&gt;
problem.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;reduce the overall timeline to 1yr, bring forward all the 2029 &lt;br&gt;
dates to 2027. That's 6 months of &amp;quot;heads up&amp;quot;, and 6 months of &amp;quot;read &lt;br&gt;
only mode plus brownouts&amp;quot; before shutdown ad the end of 2027.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Although I didn't say &amp;quot;to a year&amp;quot; but &amp;quot;by a year&amp;quot;, I am still okay with &lt;br&gt;
your suggestion.&lt;/p&gt;
&lt;p&gt;cheers, &lt;br&gt;
Derick&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
&lt;a href="https://derickrethans.nl" rel="nofollow" target="_blank"&gt;https://derickrethans.nl&lt;/a&gt; | &lt;a href="https://xdebug.org" rel="nofollow" target="_blank"&gt;https://xdebug.org&lt;/a&gt; | &lt;a href="https://xdebug.cloud" rel="nofollow" target="_blank"&gt;https://xdebug.cloud&lt;/a&gt; &lt;br&gt;
Author of Xdebug. Like it? Consider supporting me: &lt;a href="https://xdebug.org/support" rel="nofollow" target="_blank"&gt;https://xdebug.org/support&lt;/a&gt; &lt;br&gt;
mastodon: @&lt;a href="mailto:derickr@phpc.social" rel="nofollow" target="_blank"&gt;derickr@phpc.social&lt;/a&gt; @&lt;a href="mailto:xdebug@phpc.social" rel="nofollow" target="_blank"&gt;xdebug@phpc.social&lt;/a&gt;&lt;/p&gt;
</description><guid>08d10e50-7da0-b6e4-2533-48a31d5343cd@php.net</guid><pubDate>Tue, 10 Nov 2026 16:42:58 +0000</pubDate></item><item><title>[RFC] CSV Extension (ext/csv)</title><link>https://externals.io/message/133062</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi Ignace,&lt;/p&gt;
&lt;p&gt;Thanks for the suggestion. I agree that a dedicated interface for &lt;br&gt;
converting objects into CSV fields could be useful.&lt;/p&gt;
&lt;p&gt;I'd prefer to avoid the term &amp;quot;serialization&amp;quot;, as I've deliberately &lt;br&gt;
used &amp;quot;conversion&amp;quot; throughout the RFC. Something like &lt;br&gt;
|Csv\FieldConvertible| with a |toCsvField()| method would be more &lt;br&gt;
consistent with that terminology.&lt;/p&gt;
&lt;p&gt;There is one thing I'd like to consider before introducing it, though.&lt;/p&gt;
&lt;p&gt;The last item in the RFC's Future Scope section already mentions the &lt;br&gt;
possibility of an object-oriented API. I think a dedicated conversion &lt;br&gt;
interface would fit quite naturally into such an API.&lt;/p&gt;
&lt;p&gt;With the current function-based API, callers can already explicitly &lt;br&gt;
invoke their own conversion methods before passing values to the CSV &lt;br&gt;
functions:&lt;/p&gt;
&lt;p&gt;|Csv\array_to_row([ $object-&amp;gt;toCsvField(), ]);|&lt;/p&gt;
&lt;p&gt;This provides explicit control over the CSV representation without &lt;br&gt;
requiring a new interface in the initial API.&lt;/p&gt;
&lt;p&gt;So the question, in my view, is whether we really need to introduce a &lt;br&gt;
dedicated interface now, or whether it would be better to revisit it &lt;br&gt;
alongside the potential object-oriented API, where its role and &lt;br&gt;
integration could be considered more broadly.&lt;/p&gt;
&lt;p&gt;I'm not opposed to the interface itself. I'd just prefer to avoid &lt;br&gt;
expanding the initial scope unless there's a compelling use case that &lt;br&gt;
the existing functions cannot reasonably accommodate.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Damian,&lt;/p&gt;
&lt;p&gt;Please respect the mailing list rules [1] and always reply with a &lt;br&gt;
bottom-post. This conversation as it is currently, is impossible to &lt;br&gt;
follow with Ignace (correctly) bottom posting and you consistently &lt;br&gt;
incorrectly top-posting.&lt;/p&gt;
&lt;p&gt;Smile, &lt;br&gt;
Juliette&lt;/p&gt;
&lt;p&gt;1: &lt;a href="https://github.com/php/php-src/blob/master/docs/mailinglist-rules.md" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/blob/master/docs/mailinglist-rules.md&lt;/a&gt;&lt;/p&gt;
</description><guid>6AF344DE.2040402@adviesenzo.nl</guid><pubDate>Tue, 10 Nov 2026 16:22:54 +0000</pubDate></item><item><title>[RFC] CSV Extension (ext/csv)</title><link>https://externals.io/message/133061</link><description>&lt;p&gt;On Tue, Nov 10, 2026 at 2:45 PM Damian Jóźwiak &amp;lt; &lt;br&gt;
&lt;a href="mailto:damian.jozwiak.lodz@gmail.com" rel="nofollow" target="_blank"&gt;damian.jozwiak.lodz@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Ignace,&lt;/p&gt;
&lt;p&gt;Thanks for the suggestion. I agree that a dedicated interface for &lt;br&gt;
converting objects into CSV fields could be useful.&lt;/p&gt;
&lt;p&gt;I'd prefer to avoid the term &amp;quot;serialization&amp;quot;, as I've deliberately used &lt;br&gt;
&amp;quot;conversion&amp;quot; throughout the RFC. Something like Csv\FieldConvertible with &lt;br&gt;
a toCsvField() method would be more consistent with that terminology.&lt;/p&gt;
&lt;p&gt;There is one thing I'd like to consider before introducing it, though.&lt;/p&gt;
&lt;p&gt;The last item in the RFC's Future Scope section already mentions the &lt;br&gt;
possibility of an object-oriented API. I think a dedicated conversion &lt;br&gt;
interface would fit quite naturally into such an API.&lt;/p&gt;
&lt;p&gt;With the current function-based API, callers can already explicitly invoke &lt;br&gt;
their own conversion methods before passing values to the CSV functions:&lt;/p&gt;
&lt;p&gt;Csv\array_to_row([ &lt;br&gt;
$object-&amp;gt;toCsvField(), &lt;br&gt;
]);&lt;/p&gt;
&lt;p&gt;This provides explicit control over the CSV representation without &lt;br&gt;
requiring a new interface in the initial API.&lt;/p&gt;
&lt;p&gt;So the question, in my view, is whether we really need to introduce a &lt;br&gt;
dedicated interface now, or whether it would be better to revisit it &lt;br&gt;
alongside the potential object-oriented API, where its role and integration &lt;br&gt;
could be considered more broadly.&lt;/p&gt;
&lt;p&gt;I'm not opposed to the interface itself. I'd just prefer to avoid &lt;br&gt;
expanding the initial scope unless there's a compelling use case that the &lt;br&gt;
existing functions cannot reasonably accommodate.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian&lt;/p&gt;
&lt;p&gt;On Tue, Nov 10, 2026 at 1:38 PM ignace nyamagana butera &amp;lt; &lt;br&gt;
&lt;a href="mailto:nyamsprod@gmail.com" rel="nofollow" target="_blank"&gt;nyamsprod@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On Tue, Nov 10, 2026 at 12:07 PM Damian Jóźwiak &amp;lt; &lt;br&gt;
&lt;a href="mailto:damian.jozwiak.lodz@gmail.com" rel="nofollow" target="_blank"&gt;damian.jozwiak.lodz@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Ignace,&lt;/p&gt;
&lt;p&gt;Thank you, that's a good catch. Writing the section showed that The &lt;br&gt;
RFC also contained an inconsistency between the documented behaviour and &lt;br&gt;
the implementation: it said unsupported fields throw a TypeError, but the &lt;br&gt;
implementation just did a plain string cast, exactly like &lt;code&gt;fputcsv()&lt;/code&gt;. So &lt;br&gt;
arrays became &amp;quot;Array&amp;quot; with a warning, resources became &amp;quot;Resource id &lt;br&gt;
#N&amp;quot; silently, and all enums threw a generic Error.&lt;/p&gt;
&lt;p&gt;I've added a &amp;quot;Supported types&amp;quot; section to the RFC and updated the &lt;br&gt;
implementation to match. When writing, fields are converted as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;string: as is&lt;/li&gt;
&lt;li&gt;null: empty field&lt;/li&gt;
&lt;li&gt;bool: &amp;quot;1&amp;quot; / &amp;quot;0&amp;quot; (false used to be written as an empty field, which &lt;br&gt;
could not be told apart from null)&lt;/li&gt;
&lt;li&gt;int: decimal representation&lt;/li&gt;
&lt;li&gt;float: formatted with serialize_precision, like &lt;code&gt;json_encode()&lt;/code&gt;. &lt;br&gt;
&lt;code&gt;fputcsv()&lt;/code&gt; uses precision, so 0.1 + 0.2 was silently truncated to 0.3.&lt;/li&gt;
&lt;li&gt;backed enum: its backing value&lt;/li&gt;
&lt;li&gt;object convertible to string: the result of the string conversion &lt;br&gt;
(__toString(), or the internal cast of classes such as GMP)&lt;/li&gt;
&lt;li&gt;pure enum, any other object, array, resource: TypeError&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The error names the field and the row, e.g. Field &amp;quot;name&amp;quot; of element 3 &lt;br&gt;
of the collection must be of type null|bool|int|float|string|BackedEnum or &lt;br&gt;
an object convertible to string, resource given.&lt;/p&gt;
&lt;p&gt;When reading, every field is returned as a string, with no type &lt;br&gt;
inference.&lt;/p&gt;
&lt;p&gt;The one place where I deliberately diverge from the Query Params RFC &lt;br&gt;
is objects convertible to string. They are accepted without an explicit &lt;br&gt;
cast because &lt;code&gt;fputcsv()&lt;/code&gt; and SplFileObject::fputcsv() accept them today, and &lt;br&gt;
this extension is meant to be the migration target for the latter. &lt;br&gt;
Requiring (string) &lt;br&gt;
there seemed like friction without much benefit. If you see a strong &lt;br&gt;
reason to align fully, I'm open to changing it.&lt;/p&gt;
&lt;p&gt;On your PS: I agree it's worth doing, but I've kept it out of this RFC &lt;br&gt;
and listed it under Future Scope. Adding backed enum support to &lt;code&gt;fputcsv()&lt;/code&gt; &lt;br&gt;
would not be a BC break, since enums currently throw there. Like the &lt;br&gt;
&lt;code&gt;http_build_query()&lt;/code&gt; change in 8.4 (GH-15650, fixed via GH-15704 without an &lt;br&gt;
RFC), it could be &lt;br&gt;
a small standalone PR for 8.7. Rejecting resources and arrays in the &lt;br&gt;
legacy functions, on the other hand, would be a BC break and would need a &lt;br&gt;
deprecation first.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian&lt;/p&gt;
&lt;p&gt;On Tue, Nov 10, 2026 at 9:36 AM ignace nyamagana butera &amp;lt; &lt;br&gt;
&lt;a href="mailto:nyamsprod@gmail.com" rel="nofollow" target="_blank"&gt;nyamsprod@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On Thu, Oct 29, 2026 at 4:30 PM ignace nyamagana butera &amp;lt; &lt;br&gt;
&lt;a href="mailto:nyamsprod@gmail.com" rel="nofollow" target="_blank"&gt;nyamsprod@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On Fri, Oct 9, 2026 at 8:22 AM Damian Jóźwiak &amp;lt; &lt;br&gt;
&lt;a href="mailto:damian.jozwiak.lodz@gmail.com" rel="nofollow" target="_blank"&gt;damian.jozwiak.lodz@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I'd like to open the discussion on an RFC proposing a dedicated CSV &lt;br&gt;
extension (ext/csv) for PHP core.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/csv_extension" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/csv_extension&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/24199" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/24199&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The proposal builds upon Gina Peter Banyard's girgias/csv extension &lt;br&gt;
(BSD-3-Clause), with additional functionality for file and stream handling.&lt;/p&gt;
&lt;p&gt;The motivation includes the deprecation of the SplFileObject CSV &lt;br&gt;
methods in PHP 8.6, which leaves certain use cases without a direct &lt;br&gt;
replacement.&lt;/p&gt;
&lt;p&gt;The proposed extension provides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Six functions and one class in the Csv\ namespace.&lt;/h2&gt;
&lt;h2&gt;RFC 4180-compatible parsing and serialization by default.&lt;/h2&gt;
&lt;h2&gt;Locale-independent processing without the proprietary escape &lt;br&gt;
mechanism.&lt;/h2&gt;
&lt;h2&gt;Multibyte delimiters, enclosures, and EOL sequences.&lt;/h2&gt;
&lt;h2&gt;Strict and lax collection parsing.&lt;/h2&gt;
&lt;p&gt;Lazy iteration over CSV files and streaming output.&lt;/p&gt;
&lt;p&gt;The implementation includes PHPT tests covering parsing, &lt;br&gt;
serialization, stream handling, resource lifetime, and various edge cases.&lt;/p&gt;
&lt;p&gt;The pull request's CI checks are currently passing across the tested &lt;br&gt;
platforms, including debug, ZTS, and AddressSanitizer configurations.&lt;/p&gt;
&lt;p&gt;The initial API is deliberately kept small. A more comprehensive &lt;br&gt;
object-oriented Reader/Writer API, including capability-oriented &lt;br&gt;
interfaces, is left for potential future discussion.&lt;/p&gt;
&lt;p&gt;I'd particularly appreciate feedback on the public API design, the &lt;br&gt;
naming of LazyLaxCollection, and whether the extension should be &lt;br&gt;
always enabled or optional at build time.&lt;/p&gt;
&lt;p&gt;For transparency, Gina has not reviewed or endorsed this RFC. Parts &lt;br&gt;
of the implementation were developed with LLM assistance; I have reviewed &lt;br&gt;
the code and take full responsibility for the contribution.&lt;/p&gt;
&lt;p&gt;This is an invitation for discussion, not a call for votes.&lt;/p&gt;
&lt;p&gt;Thanks in advance for your feedback.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian Jóźwiak&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien, &lt;br&gt;
thanks for the proposal, indeed with the deprecation of SplFileObject &lt;br&gt;
CSV feature an object oriented alternative is welcomed having said that.I &lt;br&gt;
have a couple of remarks/suggestions&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Following Tim's thought, I wonder if a CSV top namespace is &lt;br&gt;
mandatory or if we should not just have a Serialization &amp;quot;namespace&amp;quot; name &lt;br&gt;
that can be improved when such classes and functions are defined.&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;*RFC 4180-compatible parsing and serialization by default. *As &lt;br&gt;
much as I am a proponent of backing RFC whenever they exist in this case it &lt;br&gt;
should be stressed out that RFC4180 is not an accepted RFC like for &lt;br&gt;
instance RFC3986 for URI specification as such it is totally possible to &lt;br&gt;
have a valid CSV which does not comply with the refer draft specification. &lt;br&gt;
I believe this should be noted and explained in the RFC to avoid pushing &lt;br&gt;
forward something which is not a real specification as anyone would expect &lt;br&gt;
even though it is widely accepted as the &amp;quot;default&amp;quot; implementation,&lt;/h2&gt;
&lt;h2&gt;Hence why I believe that using terms like &lt;em&gt;lax&lt;/em&gt; and &lt;em&gt;strict&lt;/em&gt; is &lt;br&gt;
counter productive; probably other names &amp;quot;to be defined&amp;quot; should be used &lt;br&gt;
instead. Maybe adding an Enum With RFC4180 and something else (?) would be &lt;br&gt;
a better take. Which would reduce the number of function/methods introduced &lt;br&gt;
?&lt;/h2&gt;
&lt;p&gt;Also while it is common to talk about CSV, this feature would be &lt;br&gt;
perhaps better called &lt;em&gt;Character Separated Value&lt;/em&gt; than  Comma &lt;br&gt;
Separated Value since the delimiter can be changed. And covers TSV and &lt;br&gt;
other exotic formats which separates values per single character.&lt;/p&gt;
&lt;p&gt;The stream is owned by the object: like the stream of SplFileObject,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;it remains visible as a resource but &lt;code&gt;fclose()&lt;/code&gt; refuses to close it, &lt;br&gt;
and it is closed when the object is destroyed (for an object alive until &lt;br&gt;
the end of the request, while destructors run, so a user wrapper's &lt;br&gt;
stream_close() is still called).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Does it mean that the LazyLaxCollection will expose the stream &lt;br&gt;
metadata ? If I receive in my method/function a  LazyLaxCollection is &lt;br&gt;
it possible for me to get access to the underlying resource metadata ? To &lt;br&gt;
know how it is open, its pathname , and so forth ? Can I easily detect if&lt;/p&gt;
&lt;p&gt;Being able to configure the context or to apply stream filter is also &lt;br&gt;
something I find useful with the current set of csv function even with &lt;br&gt;
SplFileObject (even though it is tricky with that one) I would expect any &lt;br&gt;
API which aim at replacing the current CSV API to offer at most the same &lt;br&gt;
extensibility or to allow it in any other shape or form.&lt;/p&gt;
&lt;p&gt;function collection_to_file(string $file, iterable $collection, string $delimiter = ',', string $enclosure = '&amp;quot;', string $eolSequence = &amp;quot;\r\n&amp;quot;): void {}&lt;/p&gt;
&lt;p&gt;Why? can't we have access to the written bytes as returned value. &lt;br&gt;
Otherwise it means we need to re-access the resource afterward if we want &lt;br&gt;
to get access to that value. For example if we want to generate the &lt;br&gt;
Content-Length header or something else ?&lt;/p&gt;
&lt;p&gt;Overall, I like the direction of the RFC but I believe some major &lt;br&gt;
discussion points remain unsolved before going to a vote&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;p&gt;It just occurred to me that I forgot to mention one point: the RFC is &lt;br&gt;
missing a section defining the supported types, similar to the one included &lt;br&gt;
in the URI Query Parameters RFC: &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/query_params#supported_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/query_params#supported_types&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I believe such a section is important to avoid surprising behaviour &lt;br&gt;
when generating CSV data.&lt;/p&gt;
&lt;p&gt;For instance, the current CSV implementation in PHP does not support &lt;br&gt;
converting objects of any kind. However, since the introduction of enums, &lt;br&gt;
both JSON serialization and &lt;code&gt;http_build_query()&lt;/code&gt; support backed enums as &lt;br&gt;
values that can be converted. I would therefore expect backed enums to be &lt;br&gt;
supported by your proposal, or at the very least for this to be explicitly &lt;br&gt;
addressed in the RFC.&lt;/p&gt;
&lt;p&gt;Conversely, resources are currently accepted during CSV conversion &lt;br&gt;
which we all agree is an unfamiliar behaviour. This RFC could therefore be &lt;br&gt;
a good opportunity to align CSV conversion with the new Query Params RFC &lt;br&gt;
(pending its acceptance) and the existing JSON conversion rules, &lt;br&gt;
establishing a common baseline for type conversion and serialization across &lt;br&gt;
PHP.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;PS:&lt;/em&gt; I realise this is not really the focus of your RFC, but it also &lt;br&gt;
raises the question of whether support for backed enums should be added to &lt;br&gt;
PHP's existing CSV functionality in PHP 8.7. After all, support for backed &lt;br&gt;
enums in &lt;code&gt;http_build_query()&lt;/code&gt; was introduced in PHP 8.4, rather than &lt;br&gt;
being included when enums were first introduced.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;p&gt;Thanks for adding the conversion rules. I have had a look at them, and &lt;br&gt;
there is one point I would like to raise.&lt;/p&gt;
&lt;p&gt;I am not entirely convinced that allowing any object implementing &lt;br&gt;
Stringable to be implicitly cast to a string is the right approach.&lt;/p&gt;
&lt;p&gt;In my opinion, this is somewhat of an anti-pattern because it relies on a &lt;br&gt;
generic string representation of an object rather than an explicit &lt;br&gt;
serialization contract. An object's __toString() method is not &lt;br&gt;
necessarily intended to provide a suitable representation for CSV output.&lt;/p&gt;
&lt;p&gt;I would suggest introducing a CSV-specific serialization interface &lt;br&gt;
instead, with a single dedicated method that explicitly defines how an &lt;br&gt;
object should be converted into a CSV field.&lt;/p&gt;
&lt;p&gt;Something along the lines of PHP's JsonSerializable interface:&lt;/p&gt;
&lt;p&gt;interface CsvSerializable &lt;br&gt;
{ &lt;br&gt;
public function csvSerialize(): BackerEnum|string|int|float|bool|null; &lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;Names can be changed/improved. The return type would be restricted to the &lt;br&gt;
types already supported by the CSV conversion rules. This would make the &lt;br&gt;
conversion explicit, predictable and consistent with the rest of the &lt;br&gt;
proposed serialization behaviour.&lt;/p&gt;
&lt;p&gt;It would also give objects the opportunity to provide a CSV-specific &lt;br&gt;
representation without having to overload their general string &lt;br&gt;
representation for that purpose.&lt;/p&gt;
&lt;p&gt;I believe this would be a cleaner and more extensible approach than &lt;br&gt;
relying on Stringable.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The interface could be introduced later on, but removing  __toString &lt;br&gt;
automatic conversion should be done now. so It may look like a BC break  or &lt;br&gt;
a regression vs the current conversion rules but IMHO it would be &lt;br&gt;
beneficial in the long run. I would put the change in the same category as &lt;br&gt;
removing resource to string conversion as you did.&lt;/p&gt;
&lt;p&gt;Best, &lt;br&gt;
Ignace&lt;/p&gt;
</description><guid>CAOV5rgYMd_rKegxcB9phQrHRjdBQYxhpLZwJWAoEE-OxHq=-Tg@mail.gmail.com</guid><pubDate>Tue, 10 Nov 2026 15:54:00 +0000</pubDate></item><item><title>[RFC] Request for RFC karma</title><link>https://externals.io/message/133060</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I'd like to request RFC karma for my PHP Wiki Account. &lt;br&gt;
Wiki username: beoneself&lt;/p&gt;
&lt;p&gt;Following the recent discussions and my previous pull requests about SSRF &lt;br&gt;
protection in curl, I plan to open a RFC to finalize the api around it.&lt;/p&gt;
&lt;p&gt;Have a nice day,&lt;/p&gt;
&lt;p&gt;Xavier Leune&lt;/p&gt;
</description><guid>CAKNL=FfnWtofshBm6h_ZY3UBfY5pkaQi82cExvZvzR1Cs+5XoA@mail.gmail.com</guid><pubDate>Tue, 10 Nov 2026 15:14:04 +0000</pubDate></item><item><title>[RFC] CSV Extension (ext/csv)</title><link>https://externals.io/message/133059</link><description>&lt;p&gt;Hi Ignace,&lt;/p&gt;
&lt;p&gt;Thanks for the suggestion. I agree that a dedicated interface for &lt;br&gt;
converting objects into CSV fields could be useful.&lt;/p&gt;
&lt;p&gt;I'd prefer to avoid the term &amp;quot;serialization&amp;quot;, as I've deliberately used &lt;br&gt;
&amp;quot;conversion&amp;quot; throughout the RFC. Something like Csv\FieldConvertible with a &lt;br&gt;
toCsvField() method would be more consistent with that terminology.&lt;/p&gt;
&lt;p&gt;There is one thing I'd like to consider before introducing it, though.&lt;/p&gt;
&lt;p&gt;The last item in the RFC's Future Scope section already mentions the &lt;br&gt;
possibility of an object-oriented API. I think a dedicated conversion &lt;br&gt;
interface would fit quite naturally into such an API.&lt;/p&gt;
&lt;p&gt;With the current function-based API, callers can already explicitly invoke &lt;br&gt;
their own conversion methods before passing values to the CSV functions:&lt;/p&gt;
&lt;p&gt;Csv\array_to_row([ &lt;br&gt;
$object-&amp;gt;toCsvField(), &lt;br&gt;
]);&lt;/p&gt;
&lt;p&gt;This provides explicit control over the CSV representation without &lt;br&gt;
requiring a new interface in the initial API.&lt;/p&gt;
&lt;p&gt;So the question, in my view, is whether we really need to introduce a &lt;br&gt;
dedicated interface now, or whether it would be better to revisit it &lt;br&gt;
alongside the potential object-oriented API, where its role and integration &lt;br&gt;
could be considered more broadly.&lt;/p&gt;
&lt;p&gt;I'm not opposed to the interface itself. I'd just prefer to avoid expanding &lt;br&gt;
the initial scope unless there's a compelling use case that the existing &lt;br&gt;
functions cannot reasonably accommodate.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian&lt;/p&gt;
&lt;p&gt;On Tue, Nov 10, 2026 at 1:38 PM ignace nyamagana butera &lt;a href="mailto:nyamsprod@gmail.com"&gt;nyamsprod@gmail.com&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On Tue, Nov 10, 2026 at 12:07 PM Damian Jóźwiak &amp;lt; &lt;br&gt;
&lt;a href="mailto:damian.jozwiak.lodz@gmail.com" rel="nofollow" target="_blank"&gt;damian.jozwiak.lodz@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Ignace,&lt;/p&gt;
&lt;p&gt;Thank you, that's a good catch. Writing the section showed that The RFC &lt;br&gt;
also contained an inconsistency between the documented behaviour and the &lt;br&gt;
implementation: it said unsupported fields throw a TypeError, but the &lt;br&gt;
implementation just did a plain string cast, exactly like &lt;code&gt;fputcsv()&lt;/code&gt;. So &lt;br&gt;
arrays became &amp;quot;Array&amp;quot; with a warning, resources became &amp;quot;Resource id &lt;br&gt;
#N&amp;quot; silently, and all enums threw a generic Error.&lt;/p&gt;
&lt;p&gt;I've added a &amp;quot;Supported types&amp;quot; section to the RFC and updated the &lt;br&gt;
implementation to match. When writing, fields are converted as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;string: as is&lt;/li&gt;
&lt;li&gt;null: empty field&lt;/li&gt;
&lt;li&gt;bool: &amp;quot;1&amp;quot; / &amp;quot;0&amp;quot; (false used to be written as an empty field, which &lt;br&gt;
could not be told apart from null)&lt;/li&gt;
&lt;li&gt;int: decimal representation&lt;/li&gt;
&lt;li&gt;float: formatted with serialize_precision, like &lt;code&gt;json_encode()&lt;/code&gt;. &lt;br&gt;
&lt;code&gt;fputcsv()&lt;/code&gt; uses precision, so 0.1 + 0.2 was silently truncated to 0.3.&lt;/li&gt;
&lt;li&gt;backed enum: its backing value&lt;/li&gt;
&lt;li&gt;object convertible to string: the result of the string conversion &lt;br&gt;
(__toString(), or the internal cast of classes such as GMP)&lt;/li&gt;
&lt;li&gt;pure enum, any other object, array, resource: TypeError&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The error names the field and the row, e.g. Field &amp;quot;name&amp;quot; of element 3 &lt;br&gt;
of the collection must be of type null|bool|int|float|string|BackedEnum or &lt;br&gt;
an object convertible to string, resource given.&lt;/p&gt;
&lt;p&gt;When reading, every field is returned as a string, with no type &lt;br&gt;
inference.&lt;/p&gt;
&lt;p&gt;The one place where I deliberately diverge from the Query Params RFC is &lt;br&gt;
objects convertible to string. They are accepted without an explicit cast &lt;br&gt;
because &lt;code&gt;fputcsv()&lt;/code&gt; and SplFileObject::fputcsv() accept them today, and this &lt;br&gt;
extension is meant to be the migration target for the latter. Requiring &lt;br&gt;
(string) &lt;br&gt;
there seemed like friction without much benefit. If you see a strong &lt;br&gt;
reason to align fully, I'm open to changing it.&lt;/p&gt;
&lt;p&gt;On your PS: I agree it's worth doing, but I've kept it out of this RFC &lt;br&gt;
and listed it under Future Scope. Adding backed enum support to &lt;code&gt;fputcsv()&lt;/code&gt; &lt;br&gt;
would not be a BC break, since enums currently throw there. Like the &lt;br&gt;
&lt;code&gt;http_build_query()&lt;/code&gt; change in 8.4 (GH-15650, fixed via GH-15704 without an &lt;br&gt;
RFC), it could be &lt;br&gt;
a small standalone PR for 8.7. Rejecting resources and arrays in the &lt;br&gt;
legacy functions, on the other hand, would be a BC break and would need a &lt;br&gt;
deprecation first.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian&lt;/p&gt;
&lt;p&gt;On Tue, Nov 10, 2026 at 9:36 AM ignace nyamagana butera &amp;lt; &lt;br&gt;
&lt;a href="mailto:nyamsprod@gmail.com" rel="nofollow" target="_blank"&gt;nyamsprod@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On Thu, Oct 29, 2026 at 4:30 PM ignace nyamagana butera &amp;lt; &lt;br&gt;
&lt;a href="mailto:nyamsprod@gmail.com" rel="nofollow" target="_blank"&gt;nyamsprod@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On Fri, Oct 9, 2026 at 8:22 AM Damian Jóźwiak &amp;lt; &lt;br&gt;
&lt;a href="mailto:damian.jozwiak.lodz@gmail.com" rel="nofollow" target="_blank"&gt;damian.jozwiak.lodz@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I'd like to open the discussion on an RFC proposing a dedicated CSV &lt;br&gt;
extension (ext/csv) for PHP core.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/csv_extension" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/csv_extension&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/24199" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/24199&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The proposal builds upon Gina Peter Banyard's girgias/csv extension &lt;br&gt;
(BSD-3-Clause), with additional functionality for file and stream handling.&lt;/p&gt;
&lt;p&gt;The motivation includes the deprecation of the SplFileObject CSV &lt;br&gt;
methods in PHP 8.6, which leaves certain use cases without a direct &lt;br&gt;
replacement.&lt;/p&gt;
&lt;p&gt;The proposed extension provides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Six functions and one class in the Csv\ namespace.&lt;/h2&gt;
&lt;h2&gt;RFC 4180-compatible parsing and serialization by default.&lt;/h2&gt;
&lt;h2&gt;Locale-independent processing without the proprietary escape &lt;br&gt;
mechanism.&lt;/h2&gt;
&lt;h2&gt;Multibyte delimiters, enclosures, and EOL sequences.&lt;/h2&gt;
&lt;h2&gt;Strict and lax collection parsing.&lt;/h2&gt;
&lt;p&gt;Lazy iteration over CSV files and streaming output.&lt;/p&gt;
&lt;p&gt;The implementation includes PHPT tests covering parsing, &lt;br&gt;
serialization, stream handling, resource lifetime, and various edge cases.&lt;/p&gt;
&lt;p&gt;The pull request's CI checks are currently passing across the tested &lt;br&gt;
platforms, including debug, ZTS, and AddressSanitizer configurations.&lt;/p&gt;
&lt;p&gt;The initial API is deliberately kept small. A more comprehensive &lt;br&gt;
object-oriented Reader/Writer API, including capability-oriented &lt;br&gt;
interfaces, is left for potential future discussion.&lt;/p&gt;
&lt;p&gt;I'd particularly appreciate feedback on the public API design, the &lt;br&gt;
naming of LazyLaxCollection, and whether the extension should be &lt;br&gt;
always enabled or optional at build time.&lt;/p&gt;
&lt;p&gt;For transparency, Gina has not reviewed or endorsed this RFC. Parts of &lt;br&gt;
the implementation were developed with LLM assistance; I have reviewed the &lt;br&gt;
code and take full responsibility for the contribution.&lt;/p&gt;
&lt;p&gt;This is an invitation for discussion, not a call for votes.&lt;/p&gt;
&lt;p&gt;Thanks in advance for your feedback.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian Jóźwiak&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien, &lt;br&gt;
thanks for the proposal, indeed with the deprecation of SplFileObject &lt;br&gt;
CSV feature an object oriented alternative is welcomed having said that.I &lt;br&gt;
have a couple of remarks/suggestions&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Following Tim's thought, I wonder if a CSV top namespace is &lt;br&gt;
mandatory or if we should not just have a Serialization &amp;quot;namespace&amp;quot; name &lt;br&gt;
that can be improved when such classes and functions are defined.&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;*RFC 4180-compatible parsing and serialization by default. *As much &lt;br&gt;
as I am a proponent of backing RFC whenever they exist in this case it &lt;br&gt;
should be stressed out that RFC4180 is not an accepted RFC like for &lt;br&gt;
instance RFC3986 for URI specification as such it is totally possible to &lt;br&gt;
have a valid CSV which does not comply with the refer draft specification. &lt;br&gt;
I believe this should be noted and explained in the RFC to avoid pushing &lt;br&gt;
forward something which is not a real specification as anyone would expect &lt;br&gt;
even though it is widely accepted as the &amp;quot;default&amp;quot; implementation,&lt;/h2&gt;
&lt;h2&gt;Hence why I believe that using terms like &lt;em&gt;lax&lt;/em&gt; and &lt;em&gt;strict&lt;/em&gt; is &lt;br&gt;
counter productive; probably other names &amp;quot;to be defined&amp;quot; should be used &lt;br&gt;
instead. Maybe adding an Enum With RFC4180 and something else (?) would be &lt;br&gt;
a better take. Which would reduce the number of function/methods introduced &lt;br&gt;
?&lt;/h2&gt;
&lt;p&gt;Also while it is common to talk about CSV, this feature would be &lt;br&gt;
perhaps better called &lt;em&gt;Character Separated Value&lt;/em&gt; than  Comma &lt;br&gt;
Separated Value since the delimiter can be changed. And covers TSV and &lt;br&gt;
other exotic formats which separates values per single character.&lt;/p&gt;
&lt;p&gt;The stream is owned by the object: like the stream of SplFileObject,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;it remains visible as a resource but &lt;code&gt;fclose()&lt;/code&gt; refuses to close it, &lt;br&gt;
and it is closed when the object is destroyed (for an object alive until &lt;br&gt;
the end of the request, while destructors run, so a user wrapper's &lt;br&gt;
stream_close() is still called).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Does it mean that the LazyLaxCollection will expose the stream metadata &lt;br&gt;
? If I receive in my method/function a  LazyLaxCollection is it &lt;br&gt;
possible for me to get access to the underlying resource metadata ? To know &lt;br&gt;
how it is open, its pathname , and so forth ? Can I easily detect if&lt;/p&gt;
&lt;p&gt;Being able to configure the context or to apply stream filter is also &lt;br&gt;
something I find useful with the current set of csv function even with &lt;br&gt;
SplFileObject (even though it is tricky with that one) I would expect any &lt;br&gt;
API which aim at replacing the current CSV API to offer at most the same &lt;br&gt;
extensibility or to allow it in any other shape or form.&lt;/p&gt;
&lt;p&gt;function collection_to_file(string $file, iterable $collection, string $delimiter = ',', string $enclosure = '&amp;quot;', string $eolSequence = &amp;quot;\r\n&amp;quot;): void {}&lt;/p&gt;
&lt;p&gt;Why? can't we have access to the written bytes as returned value. &lt;br&gt;
Otherwise it means we need to re-access the resource afterward if we want &lt;br&gt;
to get access to that value. For example if we want to generate the &lt;br&gt;
Content-Length header or something else ?&lt;/p&gt;
&lt;p&gt;Overall, I like the direction of the RFC but I believe some major &lt;br&gt;
discussion points remain unsolved before going to a vote&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;p&gt;It just occurred to me that I forgot to mention one point: the RFC is &lt;br&gt;
missing a section defining the supported types, similar to the one included &lt;br&gt;
in the URI Query Parameters RFC: &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/query_params#supported_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/query_params#supported_types&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I believe such a section is important to avoid surprising behaviour when &lt;br&gt;
generating CSV data.&lt;/p&gt;
&lt;p&gt;For instance, the current CSV implementation in PHP does not support &lt;br&gt;
converting objects of any kind. However, since the introduction of enums, &lt;br&gt;
both JSON serialization and &lt;code&gt;http_build_query()&lt;/code&gt; support backed enums as &lt;br&gt;
values that can be converted. I would therefore expect backed enums to be &lt;br&gt;
supported by your proposal, or at the very least for this to be explicitly &lt;br&gt;
addressed in the RFC.&lt;/p&gt;
&lt;p&gt;Conversely, resources are currently accepted during CSV conversion which &lt;br&gt;
we all agree is an unfamiliar behaviour. This RFC could therefore be a good &lt;br&gt;
opportunity to align CSV conversion with the new Query Params RFC (pending &lt;br&gt;
its acceptance) and the existing JSON conversion rules, establishing a &lt;br&gt;
common baseline for type conversion and serialization across PHP.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;PS:&lt;/em&gt; I realise this is not really the focus of your RFC, but it also &lt;br&gt;
raises the question of whether support for backed enums should be added to &lt;br&gt;
PHP's existing CSV functionality in PHP 8.7. After all, support for backed &lt;br&gt;
enums in &lt;code&gt;http_build_query()&lt;/code&gt; was introduced in PHP 8.4, rather than &lt;br&gt;
being included when enums were first introduced.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;p&gt;Thanks for adding the conversion rules. I have had a look at them, and &lt;br&gt;
there is one point I would like to raise.&lt;/p&gt;
&lt;p&gt;I am not entirely convinced that allowing any object implementing &lt;br&gt;
Stringable to be implicitly cast to a string is the right approach.&lt;/p&gt;
&lt;p&gt;In my opinion, this is somewhat of an anti-pattern because it relies on a &lt;br&gt;
generic string representation of an object rather than an explicit &lt;br&gt;
serialization contract. An object's __toString() method is not &lt;br&gt;
necessarily intended to provide a suitable representation for CSV output.&lt;/p&gt;
&lt;p&gt;I would suggest introducing a CSV-specific serialization interface &lt;br&gt;
instead, with a single dedicated method that explicitly defines how an &lt;br&gt;
object should be converted into a CSV field.&lt;/p&gt;
&lt;p&gt;Something along the lines of PHP's JsonSerializable interface:&lt;/p&gt;
&lt;p&gt;interface CsvSerializable &lt;br&gt;
{ &lt;br&gt;
public function csvSerialize(): BackerEnum|string|int|float|bool|null; &lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;Names can be changed/improved. The return type would be restricted to the &lt;br&gt;
types already supported by the CSV conversion rules. This would make the &lt;br&gt;
conversion explicit, predictable and consistent with the rest of the &lt;br&gt;
proposed serialization behaviour.&lt;/p&gt;
&lt;p&gt;It would also give objects the opportunity to provide a CSV-specific &lt;br&gt;
representation without having to overload their general string &lt;br&gt;
representation for that purpose.&lt;/p&gt;
&lt;p&gt;I believe this would be a cleaner and more extensible approach than &lt;br&gt;
relying on Stringable.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>CA+WT9Ybkni9vTJW-tQW8Vq+c7f5JfL4P80RR07PMiSwowdDJVA@mail.gmail.com</guid><pubDate>Tue, 10 Nov 2026 13:44:59 +0000</pubDate></item><item><title>[RFC] Request lifecycle hooks for SAPIs with a worker mode</title><link>https://externals.io/message/133058</link><description>&lt;p&gt;Hi Florian,&lt;/p&gt;
&lt;p&gt;Thanks for taking the time to read the RFC and review the patches.&lt;/p&gt;
&lt;p&gt;Yes, it’s intended, and it’s already how FrankenPHP behaves today.&lt;/p&gt;
&lt;p&gt;Because of how the engine works internally, the &amp;quot;dummy&amp;quot; request that &lt;br&gt;
boots the worker script and the &amp;quot;logical&amp;quot; requests handled in the loop &lt;br&gt;
don’t overlap: they run one after the other.&lt;/p&gt;
&lt;p&gt;The full sequence in FrankenPHP is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RINIT (&amp;quot;dummy&amp;quot; request)&lt;/li&gt;
&lt;li&gt;userland bootstrap code&lt;/li&gt;
&lt;li&gt;main loop, frankenphp_handle_request() waits for a request (its &lt;br&gt;
first call first runs REND to clean the request-specific state tied to &lt;br&gt;
the &amp;quot;dummy&amp;quot; request):
&lt;ul&gt;
&lt;li&gt;RBEGIN (logical HTTP request)&lt;/li&gt;
&lt;li&gt;callback&lt;/li&gt;
&lt;li&gt;REND (logical HTTP request)&lt;/li&gt;
&lt;li&gt;when the worker must stop, frankenphp_handle_request() calls &lt;br&gt;
RBEGIN and returns false: this recreates a &amp;quot;dummy&amp;quot; request, because &lt;br&gt;
the code after the loop can still write output, and &lt;br&gt;
php_request_shutdown() needs an active request&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;userland shutdown code&lt;/li&gt;
&lt;li&gt;RSHUTDOWN (&amp;quot;dummy&amp;quot; request)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For extensions, the rules are the same as today: what is set up in &lt;br&gt;
RINIT or RBEGIN must be released in the next REND or RSHUTDOWN. A &lt;br&gt;
debugger or a profiler will likely keep running the same code as today &lt;br&gt;
in RSHUTDOWN, and an adapted version of it in the new REND. That’s by &lt;br&gt;
design: existing extensions keep working unchanged, and a logical &lt;br&gt;
request is now simply one that starts with RBEGIN and ends with REND. &lt;br&gt;
Best,&lt;/p&gt;
&lt;p&gt;Kévin&lt;/p&gt;
</description><guid>CADU7aothfqP7aObazumHc+LE=Sf6an7tTX+qw-UihkUcmo-CBA@mail.gmail.com</guid><pubDate>Tue, 10 Nov 2026 13:26:21 +0000</pubDate></item><item><title>[RFC] Scope</title><link>https://externals.io/message/133057</link><description>&lt;p&gt;Hi Côme,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If suddenly scope starts to clear headers, ini_set or whatever, all existing code using it will break?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Nothing is cleared, in this RFC or in a later one. When a piece of state follows the scope, each scope has its own instance of it. The root scope keeps the process state exactly as it is today, so code that never creates a scope, which is all code written before this RFC, sees no change, now or later.&lt;/p&gt;
&lt;p&gt;Code that runs inside a non-root scope is also meant to keep working as it does today. That is one of the purposes of Scope: legacy code should keep working in a long-running server without being rewritten. Take vote B: code that calls Locale::setDefault() for user X and later Locale::getDefault() does so within one request, and both calls happen in the same scope, so it gets the locale it set. What changes is that a request for user Y, running in another scope, no longer sees X's locale. From the point of view of the code, nothing changed; it just stopped being affected by other requests.&lt;/p&gt;
&lt;p&gt;The reason this holds is where scopes are switched. Code does not switch scope while it is processing one request. Scopes are switched between requests, by the SAPI or the application server, which is also the party that has the request to put into the new scope. The parallel work a request starts stays in the request, through fibers, which follow the scope. Larry's legacyLogic() example creates a scope in the middle of a request and then expects the request's data to still be there; that is not what run() is for, and I'll make that more explicit in the RFC.&lt;/p&gt;
&lt;p&gt;Each later move is still its own RFC, with its own BC section and vote; the Future Scope list states the direction, so that servers and frameworks creating scopes know it before they write that code. What this RFC fixes now is the rule they would all follow: a scope has its own instance of the state that follows it, and the root keeps what the process has today.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Frode Børli&lt;/p&gt;
</description><guid>AS8PR08MB73391C3B9AC58CF4ADC9BEE1D9722@AS8PR08MB7339.eurprd08.prod.outlook.com</guid><pubDate>Tue, 10 Nov 2026 12:46:42 +0000</pubDate></item><item><title>[RFC] CSV Extension (ext/csv)</title><link>https://externals.io/message/133056</link><description>&lt;p&gt;On Tue, Nov 10, 2026 at 12:07 PM Damian Jóźwiak &amp;lt; &lt;br&gt;
&lt;a href="mailto:damian.jozwiak.lodz@gmail.com" rel="nofollow" target="_blank"&gt;damian.jozwiak.lodz@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Ignace,&lt;/p&gt;
&lt;p&gt;Thank you, that's a good catch. Writing the section showed that The RFC &lt;br&gt;
also contained an inconsistency between the documented behaviour and the &lt;br&gt;
implementation: it said unsupported fields throw a TypeError, but the &lt;br&gt;
implementation just did a plain string cast, exactly like &lt;code&gt;fputcsv()&lt;/code&gt;. So &lt;br&gt;
arrays became &amp;quot;Array&amp;quot; with a warning, resources became &amp;quot;Resource id &lt;br&gt;
#N&amp;quot; silently, and all enums threw a generic Error.&lt;/p&gt;
&lt;p&gt;I've added a &amp;quot;Supported types&amp;quot; section to the RFC and updated the &lt;br&gt;
implementation to match. When writing, fields are converted as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;string: as is&lt;/li&gt;
&lt;li&gt;null: empty field&lt;/li&gt;
&lt;li&gt;bool: &amp;quot;1&amp;quot; / &amp;quot;0&amp;quot; (false used to be written as an empty field, which &lt;br&gt;
could not be told apart from null)&lt;/li&gt;
&lt;li&gt;int: decimal representation&lt;/li&gt;
&lt;li&gt;float: formatted with serialize_precision, like &lt;code&gt;json_encode()&lt;/code&gt;. &lt;br&gt;
&lt;code&gt;fputcsv()&lt;/code&gt; uses precision, so 0.1 + 0.2 was silently truncated to 0.3.&lt;/li&gt;
&lt;li&gt;backed enum: its backing value&lt;/li&gt;
&lt;li&gt;object convertible to string: the result of the string conversion &lt;br&gt;
(__toString(), or the internal cast of classes such as GMP)&lt;/li&gt;
&lt;li&gt;pure enum, any other object, array, resource: TypeError&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The error names the field and the row, e.g. Field &amp;quot;name&amp;quot; of element 3 of &lt;br&gt;
the collection must be of type null|bool|int|float|string|BackedEnum or an &lt;br&gt;
object convertible to string, resource given.&lt;/p&gt;
&lt;p&gt;When reading, every field is returned as a string, with no type &lt;br&gt;
inference.&lt;/p&gt;
&lt;p&gt;The one place where I deliberately diverge from the Query Params RFC is &lt;br&gt;
objects convertible to string. They are accepted without an explicit cast &lt;br&gt;
because &lt;code&gt;fputcsv()&lt;/code&gt; and SplFileObject::fputcsv() accept them today, and this &lt;br&gt;
extension is meant to be the migration target for the latter. Requiring &lt;br&gt;
(string) &lt;br&gt;
there seemed like friction without much benefit. If you see a strong &lt;br&gt;
reason to align fully, I'm open to changing it.&lt;/p&gt;
&lt;p&gt;On your PS: I agree it's worth doing, but I've kept it out of this RFC &lt;br&gt;
and listed it under Future Scope. Adding backed enum support to &lt;code&gt;fputcsv()&lt;/code&gt; &lt;br&gt;
would not be a BC break, since enums currently throw there. Like the &lt;br&gt;
&lt;code&gt;http_build_query()&lt;/code&gt; change in 8.4 (GH-15650, fixed via GH-15704 without an &lt;br&gt;
RFC), it could be &lt;br&gt;
a small standalone PR for 8.7. Rejecting resources and arrays in the &lt;br&gt;
legacy functions, on the other hand, would be a BC break and would need a &lt;br&gt;
deprecation first.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian&lt;/p&gt;
&lt;p&gt;On Tue, Nov 10, 2026 at 9:36 AM ignace nyamagana butera &amp;lt; &lt;br&gt;
&lt;a href="mailto:nyamsprod@gmail.com" rel="nofollow" target="_blank"&gt;nyamsprod@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On Thu, Oct 29, 2026 at 4:30 PM ignace nyamagana butera &amp;lt; &lt;br&gt;
&lt;a href="mailto:nyamsprod@gmail.com" rel="nofollow" target="_blank"&gt;nyamsprod@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On Fri, Oct 9, 2026 at 8:22 AM Damian Jóźwiak &amp;lt; &lt;br&gt;
&lt;a href="mailto:damian.jozwiak.lodz@gmail.com" rel="nofollow" target="_blank"&gt;damian.jozwiak.lodz@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I'd like to open the discussion on an RFC proposing a dedicated CSV &lt;br&gt;
extension (ext/csv) for PHP core.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/csv_extension" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/csv_extension&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/24199" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/24199&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The proposal builds upon Gina Peter Banyard's girgias/csv extension &lt;br&gt;
(BSD-3-Clause), with additional functionality for file and stream handling.&lt;/p&gt;
&lt;p&gt;The motivation includes the deprecation of the SplFileObject CSV &lt;br&gt;
methods in PHP 8.6, which leaves certain use cases without a direct &lt;br&gt;
replacement.&lt;/p&gt;
&lt;p&gt;The proposed extension provides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Six functions and one class in the Csv\ namespace.&lt;/h2&gt;
&lt;h2&gt;RFC 4180-compatible parsing and serialization by default.&lt;/h2&gt;
&lt;h2&gt;Locale-independent processing without the proprietary escape &lt;br&gt;
mechanism.&lt;/h2&gt;
&lt;h2&gt;Multibyte delimiters, enclosures, and EOL sequences.&lt;/h2&gt;
&lt;h2&gt;Strict and lax collection parsing.&lt;/h2&gt;
&lt;p&gt;Lazy iteration over CSV files and streaming output.&lt;/p&gt;
&lt;p&gt;The implementation includes PHPT tests covering parsing, serialization, &lt;br&gt;
stream handling, resource lifetime, and various edge cases.&lt;/p&gt;
&lt;p&gt;The pull request's CI checks are currently passing across the tested &lt;br&gt;
platforms, including debug, ZTS, and AddressSanitizer configurations.&lt;/p&gt;
&lt;p&gt;The initial API is deliberately kept small. A more comprehensive &lt;br&gt;
object-oriented Reader/Writer API, including capability-oriented &lt;br&gt;
interfaces, is left for potential future discussion.&lt;/p&gt;
&lt;p&gt;I'd particularly appreciate feedback on the public API design, the &lt;br&gt;
naming of LazyLaxCollection, and whether the extension should be &lt;br&gt;
always enabled or optional at build time.&lt;/p&gt;
&lt;p&gt;For transparency, Gina has not reviewed or endorsed this RFC. Parts of &lt;br&gt;
the implementation were developed with LLM assistance; I have reviewed the &lt;br&gt;
code and take full responsibility for the contribution.&lt;/p&gt;
&lt;p&gt;This is an invitation for discussion, not a call for votes.&lt;/p&gt;
&lt;p&gt;Thanks in advance for your feedback.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian Jóźwiak&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien, &lt;br&gt;
thanks for the proposal, indeed with the deprecation of SplFileObject &lt;br&gt;
CSV feature an object oriented alternative is welcomed having said that.I &lt;br&gt;
have a couple of remarks/suggestions&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Following Tim's thought, I wonder if a CSV top namespace is &lt;br&gt;
mandatory or if we should not just have a Serialization &amp;quot;namespace&amp;quot; name &lt;br&gt;
that can be improved when such classes and functions are defined.&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;*RFC 4180-compatible parsing and serialization by default. *As much &lt;br&gt;
as I am a proponent of backing RFC whenever they exist in this case it &lt;br&gt;
should be stressed out that RFC4180 is not an accepted RFC like for &lt;br&gt;
instance RFC3986 for URI specification as such it is totally possible to &lt;br&gt;
have a valid CSV which does not comply with the refer draft specification. &lt;br&gt;
I believe this should be noted and explained in the RFC to avoid pushing &lt;br&gt;
forward something which is not a real specification as anyone would expect &lt;br&gt;
even though it is widely accepted as the &amp;quot;default&amp;quot; implementation,&lt;/h2&gt;
&lt;h2&gt;Hence why I believe that using terms like &lt;em&gt;lax&lt;/em&gt; and &lt;em&gt;strict&lt;/em&gt; is &lt;br&gt;
counter productive; probably other names &amp;quot;to be defined&amp;quot; should be used &lt;br&gt;
instead. Maybe adding an Enum With RFC4180 and something else (?) would be &lt;br&gt;
a better take. Which would reduce the number of function/methods introduced &lt;br&gt;
?&lt;/h2&gt;
&lt;p&gt;Also while it is common to talk about CSV, this feature would be &lt;br&gt;
perhaps better called &lt;em&gt;Character Separated Value&lt;/em&gt; than  Comma &lt;br&gt;
Separated Value since the delimiter can be changed. And covers TSV and &lt;br&gt;
other exotic formats which separates values per single character.&lt;/p&gt;
&lt;p&gt;The stream is owned by the object: like the stream of SplFileObject, it&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;remains visible as a resource but &lt;code&gt;fclose()&lt;/code&gt; refuses to close it, and it &lt;br&gt;
is closed when the object is destroyed (for an object alive until the end &lt;br&gt;
of the request, while destructors run, so a user wrapper's &lt;br&gt;
stream_close() is still called).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Does it mean that the LazyLaxCollection will expose the stream metadata &lt;br&gt;
? If I receive in my method/function a  LazyLaxCollection is it &lt;br&gt;
possible for me to get access to the underlying resource metadata ? To know &lt;br&gt;
how it is open, its pathname , and so forth ? Can I easily detect if&lt;/p&gt;
&lt;p&gt;Being able to configure the context or to apply stream filter is also &lt;br&gt;
something I find useful with the current set of csv function even with &lt;br&gt;
SplFileObject (even though it is tricky with that one) I would expect any &lt;br&gt;
API which aim at replacing the current CSV API to offer at most the same &lt;br&gt;
extensibility or to allow it in any other shape or form.&lt;/p&gt;
&lt;p&gt;function collection_to_file(string $file, iterable $collection, string $delimiter = ',', string $enclosure = '&amp;quot;', string $eolSequence = &amp;quot;\r\n&amp;quot;): void {}&lt;/p&gt;
&lt;p&gt;Why? can't we have access to the written bytes as returned value. &lt;br&gt;
Otherwise it means we need to re-access the resource afterward if we want &lt;br&gt;
to get access to that value. For example if we want to generate the &lt;br&gt;
Content-Length header or something else ?&lt;/p&gt;
&lt;p&gt;Overall, I like the direction of the RFC but I believe some major &lt;br&gt;
discussion points remain unsolved before going to a vote&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;p&gt;It just occurred to me that I forgot to mention one point: the RFC is &lt;br&gt;
missing a section defining the supported types, similar to the one included &lt;br&gt;
in the URI Query Parameters RFC: &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/query_params#supported_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/query_params#supported_types&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I believe such a section is important to avoid surprising behaviour when &lt;br&gt;
generating CSV data.&lt;/p&gt;
&lt;p&gt;For instance, the current CSV implementation in PHP does not support &lt;br&gt;
converting objects of any kind. However, since the introduction of enums, &lt;br&gt;
both JSON serialization and &lt;code&gt;http_build_query()&lt;/code&gt; support backed enums as &lt;br&gt;
values that can be converted. I would therefore expect backed enums to be &lt;br&gt;
supported by your proposal, or at the very least for this to be explicitly &lt;br&gt;
addressed in the RFC.&lt;/p&gt;
&lt;p&gt;Conversely, resources are currently accepted during CSV conversion which &lt;br&gt;
we all agree is an unfamiliar behaviour. This RFC could therefore be a good &lt;br&gt;
opportunity to align CSV conversion with the new Query Params RFC (pending &lt;br&gt;
its acceptance) and the existing JSON conversion rules, establishing a &lt;br&gt;
common baseline for type conversion and serialization across PHP.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;PS:&lt;/em&gt; I realise this is not really the focus of your RFC, but it also &lt;br&gt;
raises the question of whether support for backed enums should be added to &lt;br&gt;
PHP's existing CSV functionality in PHP 8.7. After all, support for backed &lt;br&gt;
enums in &lt;code&gt;http_build_query()&lt;/code&gt; was introduced in PHP 8.4, rather than being &lt;br&gt;
included when enums were first introduced.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;p&gt;Thanks for adding the conversion rules. I have had a look at them, and &lt;br&gt;
there is one point I would like to raise.&lt;/p&gt;
&lt;p&gt;I am not entirely convinced that allowing any object implementing Stringable &lt;br&gt;
to be implicitly cast to a string is the right approach.&lt;/p&gt;
&lt;p&gt;In my opinion, this is somewhat of an anti-pattern because it relies on a &lt;br&gt;
generic string representation of an object rather than an explicit &lt;br&gt;
serialization contract. An object's __toString() method is not necessarily &lt;br&gt;
intended to provide a suitable representation for CSV output.&lt;/p&gt;
&lt;p&gt;I would suggest introducing a CSV-specific serialization interface instead, &lt;br&gt;
with a single dedicated method that explicitly defines how an object should &lt;br&gt;
be converted into a CSV field.&lt;/p&gt;
&lt;p&gt;Something along the lines of PHP's JsonSerializable interface:&lt;/p&gt;
&lt;p&gt;interface CsvSerializable &lt;br&gt;
{ &lt;br&gt;
public function csvSerialize(): BackerEnum|string|int|float|bool|null; &lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;Names can be changed/improved. The return type would be restricted to the &lt;br&gt;
types already supported by the CSV conversion rules. This would make the &lt;br&gt;
conversion explicit, predictable and consistent with the rest of the &lt;br&gt;
proposed serialization behaviour.&lt;/p&gt;
&lt;p&gt;It would also give objects the opportunity to provide a CSV-specific &lt;br&gt;
representation without having to overload their general string &lt;br&gt;
representation for that purpose.&lt;/p&gt;
&lt;p&gt;I believe this would be a cleaner and more extensible approach than relying &lt;br&gt;
on Stringable.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
</description><guid>CAOV5rgYJo17RDRHqcXB5ny4ZKaGfH896q3a+346C=s+MDOFxqA@mail.gmail.com</guid><pubDate>Tue, 10 Nov 2026 12:38:00 +0000</pubDate></item><item><title>[Pre-RFC] Honour Linux AT_EXECVE_CHECK: W^X for PHP scripts</title><link>https://externals.io/message/133055</link><description>&lt;p&gt;Dear friends,&lt;/p&gt;
&lt;p&gt;I'd like to get early feedback on a small change: making PHP honour the &lt;br&gt;
Linux AT_EXECVE_CHECK mechanism, so that a system-wide W^X policy can &lt;br&gt;
also cover PHP code, not only native binaries.&lt;/p&gt;
&lt;h2&gt;Background&lt;/h2&gt;
&lt;p&gt;Linux 6.14 added two related features [1]:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;AT_EXECVE_CHECK, a flag for execveat(2). It asks the kernel &amp;quot;could &lt;br&gt;
this file be executed?&amp;quot; without executing it. The kernel applies the &lt;br&gt;
same checks as a real execve(): the noexec mount option, the &lt;br&gt;
executable bit, and LSM policies such as IPE or SELinux.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Two securebits, set per process and inherited by children: &lt;br&gt;
SECBIT_EXEC_RESTRICT_FILE and SECBIT_EXEC_DENY_INTERACTIVE. They &lt;br&gt;
tell &lt;br&gt;
script interpreters to enforce the result of that check.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Today a system can forbid running an unknown binary, but &lt;br&gt;
&lt;code&gt;php /tmp/payload.php&lt;/code&gt; or an include of an uploaded file still works: &lt;br&gt;
the interpreter is the loophole. The kernel side was designed for &lt;br&gt;
interpreters to close it.&lt;/p&gt;
&lt;h2&gt;What the patch does&lt;/h2&gt;
&lt;p&gt;compile_file() checks the descriptor a script is read from, before &lt;br&gt;
compiling it. The check always runs, so it can be audited (for example &lt;br&gt;
with strace), but it is only enforced when a securebit is set:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;SECBIT_EXEC_RESTRICT_FILE: the main script, include and require from &lt;br&gt;
a file that isn't executable throw an Error. This happens at compile &lt;br&gt;
time, before any of its functions or classes are bound. Streams with &lt;br&gt;
no file behind them, such as data:// and user stream wrappers, are &lt;br&gt;
refused too.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SECBIT_EXEC_DENY_INTERACTIVE: code that doesn't come from an &lt;br&gt;
executable file is refused. That covers php -r/-B/-R/-E, php -a, &lt;br&gt;
piped stdin and including &lt;a href="php://stdin" rel="nofollow" target="_blank"&gt;php://stdin&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;phar entries are checked against the archive file, and a &lt;br&gt;
Phar::mount()ed file is checked against itself.&lt;/li&gt;
&lt;li&gt;&lt;a href="php://filter" rel="nofollow" target="_blank"&gt;php://filter&lt;/a&gt; over a plain file is checked against that file.&lt;/li&gt;
&lt;li&gt;php -l still works on any file, because it doesn't execute anything.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There is no INI setting. The policy belongs to whoever starts the &lt;br&gt;
process (systemd, a container runtime, an administrator), and is &lt;br&gt;
enforced the same way for every interpreter on the system. Without the &lt;br&gt;
securebits, PHP behaves exactly as before. The cost is one execveat() &lt;br&gt;
syscall per compiled file. With opcache, a cache hit compiles nothing, &lt;br&gt;
so it costs nothing. On other platforms and on older kernels, nothing &lt;br&gt;
changes.&lt;/p&gt;
&lt;p&gt;The patch is small: about 300 lines across Zend/zend_stream.c, &lt;br&gt;
compile_file(), main, phar and the CLI SAPI.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/mihalicyn/php-src/commits/at_execve_check_support" rel="nofollow" target="_blank"&gt;https://github.com/mihalicyn/php-src/commits/at_execve_check_support&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Internals changes, listed in UPGRADING.INTERNALS:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;zend_stream has a new fd callback. Code that builds &lt;br&gt;
ZEND_HANDLE_STREAM handles itself should set it. If it doesn't, the &lt;br&gt;
code is treated as not coming from a file.&lt;/li&gt;
&lt;li&gt;There is a new PHP_STREAM_OPTION_EXEC_FD stream option, with a &lt;br&gt;
php_stream_get_exec_fd() helper. It lets a stream that reads code &lt;br&gt;
from part of a file (an archive entry) name the file to check.&lt;/li&gt;
&lt;li&gt;There is a new ZEND_COMPILE_NO_EXEC_CHECK compiler option, for code &lt;br&gt;
that is compiled but not executed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Field test&lt;/h2&gt;
&lt;p&gt;I ran phpBB 3.3 with SQLite under SECBIT_EXEC_RESTRICT_FILE, on PHP's &lt;br&gt;
built-in server. A crawl of the board and of the admin panel passes. &lt;br&gt;
Running &lt;code&gt;chmod a-x&lt;/code&gt; on a file makes every page that uses it fail with &lt;br&gt;
&amp;quot;Failed to execute ...: blocked by EXEC_RESTRICT_FILE&amp;quot;.&lt;/p&gt;
&lt;p&gt;As we know real applications pretty often generate PHP code at &lt;br&gt;
runtime. phpBB writes its config.php, its compiled Symfony container, &lt;br&gt;
its router, its BBCode renderer and its Twig templates. Under W^X, all &lt;br&gt;
of that has to be generated ahead of time and marked executable (and &lt;br&gt;
read-only) at deploy time. A warm-up script can do it. This is exactly &lt;br&gt;
the property the policy is meant to enforce, but frameworks will need a &lt;br&gt;
documented &amp;quot;compile everything at deploy&amp;quot; step. I have a self-contained &lt;br&gt;
demo (a script that builds the patched PHP and installs phpBB) in the &lt;br&gt;
same branch on GitHub.&lt;/p&gt;
&lt;h2&gt;Open questions&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;opcache: a script served from the cache is not checked again. A &lt;br&gt;
&lt;code&gt;chmod a-x&lt;/code&gt; takes effect only after a cache reset. My view is that &lt;br&gt;
processes in different security domains must not share an opcache &lt;br&gt;
(shared memory or opcache.file_cache) anyway, so the RFC would &lt;br&gt;
document this rather than add checks to opcache. Opinions welcome.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Compressed phars (.phar.gz, .phar.bz2) are refused under &lt;br&gt;
SECBIT_EXEC_RESTRICT_FILE, because phar keeps no descriptor of the &lt;br&gt;
original archive. This fails closed. Is that acceptable as a known &lt;br&gt;
limitation?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Under SECBIT_EXEC_RESTRICT_FILE, user stream wrappers can't provide &lt;br&gt;
executable code at all. I think that's correct for this policy, but &lt;br&gt;
it will surprise some setups.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Does this need an RFC vote? Without the securebits it changes no &lt;br&gt;
behaviour, but it is a new security feature and touches an internal &lt;br&gt;
ABI. I'm happy to write the RFC, and phpt tests are on the way.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Kind regards, &lt;br&gt;
Alex&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="https://docs.kernel.org/userspace-api/check_exec.html" rel="nofollow" target="_blank"&gt;https://docs.kernel.org/userspace-api/check_exec.html&lt;/a&gt;&lt;/p&gt;
</description><guid>d6c595eec78f0de137d85756165575613aa0d08b.camel@amutable.com</guid><pubDate>Tue, 10 Nov 2026 12:03:35 +0000</pubDate></item><item><title>SSRF protection in curl</title><link>https://externals.io/message/133054</link><description>&lt;p&gt;Le jeudi 15 octobre 2026, 10:47:39 heure normale d’Europe centrale Sjoerd Langkemper a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If an application performs HTTP requests based on user input, it is often desirable to verify that the connection is done to an allowed host. Otherwise the functionality could be abused to request resources on the server or on the same network as the server (SSRF).&lt;/p&gt;
&lt;p&gt;Xavier Leune made some pull requests to make this possible in curl. The idea is to hook in a callback that can verify the IP address that curl is going to connect to.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes please!&lt;/p&gt;
&lt;p&gt;This is something we’ve been missing in our codebase as well, and used the same trick as Symfony to hook into DNS resolution, but that has been an issue in the past, with some string looking like domains while actually being IPs going through to curl. &lt;br&gt;
It would help a lot to have a standard way of hooking into curl to check which IP is actually about to be contacted.&lt;/p&gt;
</description><guid>uTTf-RC2SoWg90J9e3ATbQ@chilliet.eu</guid><pubDate>Tue, 10 Nov 2026 11:42:15 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133053</link><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Le jeudi 5 novembre 2026, 18:33:14 heure normale d’Europe centrale Larry Garfield a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi folks.  Based on the feedback and problems with the previous Context Managers RFC, Arnaud and I have a new approach to present:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/context-managers-v2" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/context-managers-v2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It basically swaps the two-method approach in favor of &amp;quot;it's a generator, you're welcome.&amp;quot;  The result is, I think, both simpler and more flexible, and resolves a number of other issues as well.  More details in the RFC.&lt;/p&gt;
&lt;p&gt;There is a linked implementation, though Arnaud warns it's only partially complete so go easy on it. :-)  But the design in the RFC is all ready for review.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I do not understand this sentence: «Additionally, it is legal for a Context Manager object to return $this as the context variable if that is appropriate in the specific use case.» &lt;br&gt;
If ContextManager::getContextManager returns $this, which Generator is used 🤔&lt;/p&gt;
&lt;p&gt;The whole section «Mixing with try-catch» is also a mystery to me. I do not understand why &amp;quot;using&amp;quot; would need a short syntax for try catch any more than any other keyword we often put in a try/catch, nor what the explanations in there mean.&lt;/p&gt;
&lt;p&gt;Is the semi-colon necessary after the closing '}' ? That reads weird, it’s not clear to me why it’s not a single '}' like after an if or foreach or whatever. &lt;br&gt;
Also, this semi-colon is missing in at least one example.&lt;/p&gt;
&lt;p&gt;In the transaction example, $conn does not exist, I suppose both instances should be $this?&lt;/p&gt;
&lt;p&gt;«A return statement inside the BODY will return from the function the code is currently executing in. A finally block in the generator context manager will still be executed, but otherwise control returns to the function's caller.» &lt;br&gt;
This is also hard to get for me. &lt;br&gt;
Can you detail what this would output: &lt;br&gt;
function &lt;code&gt;context()&lt;/code&gt;: \Generator { &lt;br&gt;
echo &amp;quot;A\n&amp;quot;; &lt;br&gt;
yield &amp;quot;B&amp;quot;; &lt;br&gt;
echo &amp;quot;C\n&amp;quot;; &lt;br&gt;
return &amp;quot;D&amp;quot;; &lt;br&gt;
} &lt;br&gt;
var_dump( &lt;br&gt;
using (context() =&amp;gt; $c) { &lt;br&gt;
echo &amp;quot;E\n&amp;quot;; &lt;br&gt;
return &amp;quot;F&amp;quot;; &lt;br&gt;
} &lt;br&gt;
);&lt;/p&gt;
&lt;p&gt;Côme&lt;/p&gt;
</description><guid>puoCOkGxSiu3fHQee3pe_g@chilliet.eu</guid><pubDate>Tue, 10 Nov 2026 11:32:58 +0000</pubDate></item><item><title>[RFC] Request lifecycle hooks for SAPIs with a worker mode</title><link>https://externals.io/message/133052</link><description>&lt;p&gt;Hey Kevin,&lt;/p&gt;
&lt;p&gt;thanks for working on this. It would be really nice, from an extension &lt;br&gt;
perspective, to have an explicit way to detect the logical request &lt;br&gt;
boundaries in an explicit way. &lt;br&gt;
I had one question when looking at the FrankenPHP example at &lt;br&gt;
&lt;a href="https://github.com/php/frankenphp/compare/main...experiment/php-request-boundary-hooks" rel="nofollow" target="_blank"&gt;https://github.com/php/frankenphp/compare/main...experiment/php-request-boundary-hooks&lt;/a&gt; &lt;br&gt;
It seems that the lifecycle is actually starting with REND and &lt;br&gt;
finishing with RBEGIN? Is that intended, I can see why it is the way &lt;br&gt;
it is, it just feels odd.&lt;/p&gt;
&lt;p&gt;So for example:&lt;/p&gt;
&lt;p&gt;&amp;lt;?php &lt;br&gt;
$handler = static function () { &lt;br&gt;
echo &amp;quot;request handled&amp;quot;; &lt;br&gt;
}; &lt;br&gt;
while (frankenphp_handle_request($handler)) {} &lt;br&gt;
?&amp;gt;&lt;/p&gt;
&lt;p&gt;The lifecycle of this code would look like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RINIT (plus all the things before)&lt;/li&gt;
&lt;li&gt;FrankenPHP would execute till the call to frankenphp_handle_request()&lt;/li&gt;
&lt;li&gt;then REND (to &amp;quot;shutdown&amp;quot;/end the dummy bootstrap request)&lt;/li&gt;
&lt;li&gt;wait for an actual HTTP request and then we enter the RBEGIN -&amp;gt; REND &lt;br&gt;
loop as long as requests are served to that worker&lt;/li&gt;
&lt;li&gt;if that worker is about to shut down, frankenphp_handle_request() &lt;br&gt;
would return false, but also do another call to RBEGIN, just none to &lt;br&gt;
REND anymore before RSHUTDOWN&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Kind regards &lt;br&gt;
Florian&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;Following the recent pre-RFC discussion &lt;br&gt;
(&lt;a href="https://news-web.php.net/php.internals/132960" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/132960&lt;/a&gt;), I would like to open &lt;br&gt;
the discussion on the &amp;quot;Request lifecycle hooks for SAPIs with a worker &lt;br&gt;
mode&amp;quot; RFC: &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/request_lifecycle_hooks" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/request_lifecycle_hooks&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As presented, this RFC proposes two optional module hooks, available &lt;br&gt;
for extensions (no userland change), which are called between requests &lt;br&gt;
served by a &amp;quot;worker&amp;quot; script.&lt;/p&gt;
&lt;p&gt;I crafted a patch adding the hooks and support PHP functions. It &lt;br&gt;
implements the hooks in the built-in standard, session and filter &lt;br&gt;
extensions: &lt;a href="https://github.com/dunglas/php-src/tree/request-boundary-hooks" rel="nofollow" target="_blank"&gt;https://github.com/dunglas/php-src/tree/request-boundary-hooks&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is also a patch showing how to use this new engine feature in &lt;br&gt;
FrankenPHP: &lt;a href="https://github.com/php/frankenphp/compare/main...experiment/php-request-boundary-hooks" rel="nofollow" target="_blank"&gt;https://github.com/php/frankenphp/compare/main...experiment/php-request-boundary-hooks&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Best,&lt;/h2&gt;
&lt;p&gt;Kévin Dunglas&lt;/p&gt;
&lt;p&gt;&lt;a href="https://dunglas.dev" rel="nofollow" target="_blank"&gt;https://dunglas.dev&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>CAG=EydgnjVukLmodW5uYqd0WU1EaNqKhUCz4-u7Z1Py+SgU0tg@mail.gmail.com</guid><pubDate>Tue, 10 Nov 2026 11:12:51 +0000</pubDate></item><item><title>[RFC] CSV Extension (ext/csv)</title><link>https://externals.io/message/133051</link><description>&lt;p&gt;Hi Ignace,&lt;/p&gt;
&lt;p&gt;Thank you, that's a good catch. Writing the section showed that The RFC &lt;br&gt;
also contained an inconsistency between the documented behaviour and the &lt;br&gt;
implementation: it said unsupported fields throw a TypeError, but the &lt;br&gt;
implementation just did a plain string cast, exactly like &lt;code&gt;fputcsv()&lt;/code&gt;. So &lt;br&gt;
arrays became &amp;quot;Array&amp;quot; with a warning, resources became &amp;quot;Resource id &lt;br&gt;
#N&amp;quot; silently, and all enums threw a generic Error.&lt;/p&gt;
&lt;p&gt;I've added a &amp;quot;Supported types&amp;quot; section to the RFC and updated the &lt;br&gt;
implementation to match. When writing, fields are converted as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;string: as is&lt;/li&gt;
&lt;li&gt;null: empty field&lt;/li&gt;
&lt;li&gt;bool: &amp;quot;1&amp;quot; / &amp;quot;0&amp;quot; (false used to be written as an empty field, which &lt;br&gt;
could not be told apart from null)&lt;/li&gt;
&lt;li&gt;int: decimal representation&lt;/li&gt;
&lt;li&gt;float: formatted with serialize_precision, like &lt;code&gt;json_encode()&lt;/code&gt;. &lt;br&gt;
&lt;code&gt;fputcsv()&lt;/code&gt; uses precision, so 0.1 + 0.2 was silently truncated to 0.3.&lt;/li&gt;
&lt;li&gt;backed enum: its backing value&lt;/li&gt;
&lt;li&gt;object convertible to string: the result of the string conversion &lt;br&gt;
(__toString(), or the internal cast of classes such as GMP)&lt;/li&gt;
&lt;li&gt;pure enum, any other object, array, resource: TypeError&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The error names the field and the row, e.g. Field &amp;quot;name&amp;quot; of element 3 of &lt;br&gt;
the collection must be of type null|bool|int|float|string|BackedEnum or an &lt;br&gt;
object convertible to string, resource given.&lt;/p&gt;
&lt;p&gt;When reading, every field is returned as a string, with no type inference.&lt;/p&gt;
&lt;p&gt;The one place where I deliberately diverge from the Query Params RFC is &lt;br&gt;
objects convertible to string. They are accepted without an explicit cast &lt;br&gt;
because &lt;code&gt;fputcsv()&lt;/code&gt; and SplFileObject::fputcsv() accept them today, and this &lt;br&gt;
extension is meant to be the migration target for the latter. Requiring &lt;br&gt;
(string) &lt;br&gt;
there seemed like friction without much benefit. If you see a strong &lt;br&gt;
reason to align fully, I'm open to changing it.&lt;/p&gt;
&lt;p&gt;On your PS: I agree it's worth doing, but I've kept it out of this RFC &lt;br&gt;
and listed it under Future Scope. Adding backed enum support to &lt;code&gt;fputcsv()&lt;/code&gt; &lt;br&gt;
would not be a BC break, since enums currently throw there. Like the &lt;br&gt;
&lt;code&gt;http_build_query()&lt;/code&gt; change in 8.4 (GH-15650, fixed via GH-15704 without an &lt;br&gt;
RFC), it could be &lt;br&gt;
a small standalone PR for 8.7. Rejecting resources and arrays in the &lt;br&gt;
legacy functions, on the other hand, would be a BC break and would need a &lt;br&gt;
deprecation first.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian&lt;/p&gt;
&lt;p&gt;On Tue, Nov 10, 2026 at 9:36 AM ignace nyamagana butera &lt;a href="mailto:nyamsprod@gmail.com"&gt;nyamsprod@gmail.com&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On Thu, Oct 29, 2026 at 4:30 PM ignace nyamagana butera &amp;lt; &lt;br&gt;
&lt;a href="mailto:nyamsprod@gmail.com" rel="nofollow" target="_blank"&gt;nyamsprod@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On Fri, Oct 9, 2026 at 8:22 AM Damian Jóźwiak &amp;lt; &lt;br&gt;
&lt;a href="mailto:damian.jozwiak.lodz@gmail.com" rel="nofollow" target="_blank"&gt;damian.jozwiak.lodz@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I'd like to open the discussion on an RFC proposing a dedicated CSV &lt;br&gt;
extension (ext/csv) for PHP core.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/csv_extension" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/csv_extension&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/24199" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/24199&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The proposal builds upon Gina Peter Banyard's girgias/csv extension &lt;br&gt;
(BSD-3-Clause), with additional functionality for file and stream handling.&lt;/p&gt;
&lt;p&gt;The motivation includes the deprecation of the SplFileObject CSV &lt;br&gt;
methods in PHP 8.6, which leaves certain use cases without a direct &lt;br&gt;
replacement.&lt;/p&gt;
&lt;p&gt;The proposed extension provides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Six functions and one class in the Csv\ namespace.&lt;/h2&gt;
&lt;h2&gt;RFC 4180-compatible parsing and serialization by default.&lt;/h2&gt;
&lt;h2&gt;Locale-independent processing without the proprietary escape &lt;br&gt;
mechanism.&lt;/h2&gt;
&lt;h2&gt;Multibyte delimiters, enclosures, and EOL sequences.&lt;/h2&gt;
&lt;h2&gt;Strict and lax collection parsing.&lt;/h2&gt;
&lt;p&gt;Lazy iteration over CSV files and streaming output.&lt;/p&gt;
&lt;p&gt;The implementation includes PHPT tests covering parsing, serialization, &lt;br&gt;
stream handling, resource lifetime, and various edge cases.&lt;/p&gt;
&lt;p&gt;The pull request's CI checks are currently passing across the tested &lt;br&gt;
platforms, including debug, ZTS, and AddressSanitizer configurations.&lt;/p&gt;
&lt;p&gt;The initial API is deliberately kept small. A more comprehensive &lt;br&gt;
object-oriented Reader/Writer API, including capability-oriented &lt;br&gt;
interfaces, is left for potential future discussion.&lt;/p&gt;
&lt;p&gt;I'd particularly appreciate feedback on the public API design, the &lt;br&gt;
naming of LazyLaxCollection, and whether the extension should be always &lt;br&gt;
enabled or optional at build time.&lt;/p&gt;
&lt;p&gt;For transparency, Gina has not reviewed or endorsed this RFC. Parts of &lt;br&gt;
the implementation were developed with LLM assistance; I have reviewed the &lt;br&gt;
code and take full responsibility for the contribution.&lt;/p&gt;
&lt;p&gt;This is an invitation for discussion, not a call for votes.&lt;/p&gt;
&lt;p&gt;Thanks in advance for your feedback.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian Jóźwiak&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien, &lt;br&gt;
thanks for the proposal, indeed with the deprecation of SplFileObject CSV &lt;br&gt;
feature an object oriented alternative is welcomed having said that.I have &lt;br&gt;
a couple of remarks/suggestions&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Following Tim's thought, I wonder if a CSV top namespace is &lt;br&gt;
mandatory or if we should not just have a Serialization &amp;quot;namespace&amp;quot; name &lt;br&gt;
that can be improved when such classes and functions are defined.&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;*RFC 4180-compatible parsing and serialization by default. *As much &lt;br&gt;
as I am a proponent of backing RFC whenever they exist in this case it &lt;br&gt;
should be stressed out that RFC4180 is not an accepted RFC like for &lt;br&gt;
instance RFC3986 for URI specification as such it is totally possible to &lt;br&gt;
have a valid CSV which does not comply with the refer draft specification. &lt;br&gt;
I believe this should be noted and explained in the RFC to avoid pushing &lt;br&gt;
forward something which is not a real specification as anyone would expect &lt;br&gt;
even though it is widely accepted as the &amp;quot;default&amp;quot; implementation,&lt;/h2&gt;
&lt;h2&gt;Hence why I believe that using terms like &lt;em&gt;lax&lt;/em&gt; and &lt;em&gt;strict&lt;/em&gt; is &lt;br&gt;
counter productive; probably other names &amp;quot;to be defined&amp;quot; should be used &lt;br&gt;
instead. Maybe adding an Enum With RFC4180 and something else (?) would be &lt;br&gt;
a better take. Which would reduce the number of function/methods introduced &lt;br&gt;
?&lt;/h2&gt;
&lt;p&gt;Also while it is common to talk about CSV, this feature would be &lt;br&gt;
perhaps better called &lt;em&gt;Character Separated Value&lt;/em&gt; than  Comma &lt;br&gt;
Separated Value since the delimiter can be changed. And covers TSV and &lt;br&gt;
other exotic formats which separates values per single character.&lt;/p&gt;
&lt;p&gt;The stream is owned by the object: like the stream of SplFileObject, it&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;remains visible as a resource but &lt;code&gt;fclose()&lt;/code&gt; refuses to close it, and it &lt;br&gt;
is closed when the object is destroyed (for an object alive until the end &lt;br&gt;
of the request, while destructors run, so a user wrapper's &lt;br&gt;
stream_close() is still called).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Does it mean that the LazyLaxCollection will expose the stream metadata ? &lt;br&gt;
If I receive in my method/function a  LazyLaxCollection is it possible &lt;br&gt;
for me to get access to the underlying resource metadata ? To know how it &lt;br&gt;
is open, its pathname , and so forth ? Can I easily detect if&lt;/p&gt;
&lt;p&gt;Being able to configure the context or to apply stream filter is also &lt;br&gt;
something I find useful with the current set of csv function even with &lt;br&gt;
SplFileObject (even though it is tricky with that one) I would expect any &lt;br&gt;
API which aim at replacing the current CSV API to offer at most the same &lt;br&gt;
extensibility or to allow it in any other shape or form.&lt;/p&gt;
&lt;p&gt;function collection_to_file(string $file, iterable $collection, string $delimiter = ',', string $enclosure = '&amp;quot;', string $eolSequence = &amp;quot;\r\n&amp;quot;): void {}&lt;/p&gt;
&lt;p&gt;Why? can't we have access to the written bytes as returned value. &lt;br&gt;
Otherwise it means we need to re-access the resource afterward if we want &lt;br&gt;
to get access to that value. For example if we want to generate the &lt;br&gt;
Content-Length header or something else ?&lt;/p&gt;
&lt;p&gt;Overall, I like the direction of the RFC but I believe some major &lt;br&gt;
discussion points remain unsolved before going to a vote&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;p&gt;It just occurred to me that I forgot to mention one point: the RFC is &lt;br&gt;
missing a section defining the supported types, similar to the one included &lt;br&gt;
in the URI Query Parameters RFC: &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/query_params#supported_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/query_params#supported_types&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I believe such a section is important to avoid surprising behaviour when &lt;br&gt;
generating CSV data.&lt;/p&gt;
&lt;p&gt;For instance, the current CSV implementation in PHP does not support &lt;br&gt;
converting objects of any kind. However, since the introduction of enums, &lt;br&gt;
both JSON serialization and &lt;code&gt;http_build_query()&lt;/code&gt; support backed enums as &lt;br&gt;
values that can be converted. I would therefore expect backed enums to be &lt;br&gt;
supported by your proposal, or at the very least for this to be explicitly &lt;br&gt;
addressed in the RFC.&lt;/p&gt;
&lt;p&gt;Conversely, resources are currently accepted during CSV conversion which &lt;br&gt;
we all agree is an unfamiliar behaviour. This RFC could therefore be a good &lt;br&gt;
opportunity to align CSV conversion with the new Query Params RFC (pending &lt;br&gt;
its acceptance) and the existing JSON conversion rules, establishing a &lt;br&gt;
common baseline for type conversion and serialization across PHP.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;PS:&lt;/em&gt; I realise this is not really the focus of your RFC, but it also &lt;br&gt;
raises the question of whether support for backed enums should be added to &lt;br&gt;
PHP's existing CSV functionality in PHP 8.7. After all, support for backed &lt;br&gt;
enums in &lt;code&gt;http_build_query()&lt;/code&gt; was introduced in PHP 8.4, rather than being &lt;br&gt;
included when enums were first introduced.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>CA+WT9YYpNTAurqajCC+T9kVzb_ws_hb=hXiwH0kT39s435zxKg@mail.gmail.com</guid><pubDate>Tue, 10 Nov 2026 11:07:38 +0000</pubDate></item><item><title>[RFC] Scope</title><link>https://externals.io/message/133050</link><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Le jeudi 29 octobre 2026, 13:22:04 heure normale d’Europe centrale Larry Garfield a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Needing to write lots of boilerplate like that &amp;quot;just in case&amp;quot; is a red flag in my mind.  Moreover, if the secondary vote doesn't pass initially but is introduced in some later version, it becomes a BC break for anything using a superglobal that happens to be called from within a scope, something the function (by design) doesn't know.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I had the same question reading the RFC, how can the future scope be implemented without BC break? &lt;br&gt;
If suddenly scope starts to clear headers, ini_set or whatever, all existing code using it will break? &lt;br&gt;
Can you explain how future extension of what gets scoped can be achieved without BC break?&lt;/p&gt;
&lt;p&gt;Côme&lt;/p&gt;
</description><guid>ADm-rjp6T-yLe6gy6LMg4A@chilliet.eu</guid><pubDate>Tue, 10 Nov 2026 11:02:16 +0000</pubDate></item><item><title>Request for RFC karma</title><link>https://externals.io/message/133049</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I'd like to request RFC karma for my PHP Wiki account.&lt;/p&gt;
&lt;p&gt;Wiki username: gianfriaur&lt;/p&gt;
&lt;p&gt;I would like to start preparing the draft RFC regarding the addition of the &lt;br&gt;
new transport dtls in ext/openssl.&lt;/p&gt;
&lt;p&gt;I've opened a draft implementation PR: &lt;br&gt;
&lt;a href="https://github.com/php/php-src/pull/22638" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22638&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;the original discussion in internals: &lt;br&gt;
&lt;a href="https://news-web.php.net/php.internals/131514" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/131514&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Obviously everything has changed since the initial proposal, with bukka we &lt;br&gt;
are getting closer to the final version&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Gianfrancesco Aurecchia&lt;/p&gt;
</description><guid>CAP=-gUuZWjAUTTfEBnN3JXqyvsETaHpN5A5V0TPwDwg7sjpG2w@mail.gmail.com</guid><pubDate>Tue, 10 Nov 2026 09:03:38 +0000</pubDate></item><item><title>[Proposal] OPcache: share identical opcode arrays between cached scripts (opcache.enable_dedup)</title><link>https://externals.io/message/133048</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I would like to propose a small OPcache feature for the master branch and &lt;br&gt;
ask whether it can go through a regular PR or should be an RFC.&lt;/p&gt;
&lt;h2&gt;Problem&lt;/h2&gt;
&lt;p&gt;Shared hosts commonly run many copies of the same application from one FPM &lt;br&gt;
master: CMS cores, plugins, vendor/ trees. OPcache keys scripts by path, so &lt;br&gt;
every copy is persisted separately, although most functions compile to the &lt;br&gt;
same opcodes. Sharing whole scripts cannot work, because a compiled script &lt;br&gt;
embeds its path (op_array-&amp;gt;filename, &lt;strong&gt;FILE&lt;/strong&gt;/&lt;strong&gt;DIR&lt;/strong&gt;, runtime definition &lt;br&gt;
keys, class entries). This was discussed for APC in bug #63689 and here in &lt;br&gt;
2016 (&lt;a href="https://externals.io/message/93024" rel="nofollow" target="_blank"&gt;https://externals.io/message/93024&lt;/a&gt;).&lt;/p&gt;
&lt;h2&gt;Proposal&lt;/h2&gt;
&lt;p&gt;A new &lt;code&gt;INI_SYSTEM&lt;/code&gt; directive, opcache.enable_dedup (default 0). When enabled, &lt;br&gt;
the opcodes and literals of each op_array are looked up by content while &lt;br&gt;
the script is persisted. If an identical block is already in SHM, the &lt;br&gt;
op_array points to it instead of copying it. Everything else stays per &lt;br&gt;
op_array: filename, lines, scope, vars, arg_info, live ranges, try/catch, &lt;br&gt;
static variables. &lt;strong&gt;FILE&lt;/strong&gt;, traces, errors and Reflection are unchanged; &lt;br&gt;
path-dependent blocks simply differ and are not shared.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A hash match is always confirmed by a full comparison of the normalized &lt;br&gt;
blocks; the key is salted per SHM, probing is bounded (16 slots).&lt;/li&gt;
&lt;li&gt;Scripts are still looked up by path; validate_permission/validate_root &lt;br&gt;
are untouched. The table is only used while persisting, under the &lt;br&gt;
existing SHM lock, and nothing is freed before a restart (no refcount).&lt;/li&gt;
&lt;li&gt;The calc pass records its decision for each op_array and the persist &lt;br&gt;
pass applies it, so both passes agree on sizes and each block is &lt;br&gt;
serialized once.&lt;/li&gt;
&lt;li&gt;Disabled, with a warning, when the JIT is available, when &lt;br&gt;
opcache.file_cache is set, and on 32-bit builds. With the directive off, &lt;br&gt;
nothing is allocated and no code path changes.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;opcache_get_status()&lt;/code&gt; gets a &amp;quot;dedup&amp;quot; key (entries, hits, saved_memory).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The change is one new file (zend_accelerator_dedup.c/.h, about 700 lines) &lt;br&gt;
and about 40 lines of hooks in zend_persist*.c, ZendAccelerator.c and &lt;br&gt;
zend_accelerator_module.c, plus 15 phpt tests.&lt;/p&gt;
&lt;h2&gt;Results&lt;/h2&gt;
&lt;p&gt;Load test, 80 WordPress sites (WooCommerce, Yoast, Elementor), one user and &lt;br&gt;
one pool per site, one master, 500,000 requests per run, PHP 8.4 release:&lt;/p&gt;
&lt;p&gt;OPcache memory      6,406 MB -&amp;gt; 3,428 MB  (-46.5%) &lt;br&gt;
PHP-FPM peak PSS    6,711 MB -&amp;gt; 5,466 MB  (-18.6%) &lt;br&gt;
CPU per request     170.3 ms -&amp;gt; 171.7 ms  (within run-to-run noise) &lt;br&gt;
compile CPU         +2.2% (cold cache only) &lt;br&gt;
errors / crashes    0 / 0&lt;/p&gt;
&lt;p&gt;Production, PHP 8.4, 52 pools on one master, 11 days so far:&lt;/p&gt;
&lt;p&gt;OPcache memory      5.4 GB of bytecode stored in 3.1 GB (-43%) &lt;br&gt;
shared op_arrays    82.5% &lt;br&gt;
worker crashes      0 (SIGSEGV/SIGBUS/SIGABRT)&lt;/p&gt;
&lt;p&gt;Tests: the new tests pass on 8.2 to master; Zend/tests, tests/ and &lt;br&gt;
ext/opcache/tests show no difference with dedup forced on and &lt;br&gt;
protect_memory=1; ASan/valgrind clean; a differential fuzzer (random &lt;br&gt;
programs compiled twice to force sharing, run with and without dedup) &lt;br&gt;
found no divergence.&lt;/p&gt;
&lt;p&gt;Security: a PHP-level tenant cannot reach, read or write a shared block &lt;br&gt;
(no API returns opcodes, blocks are immutable). A native attacker can &lt;br&gt;
already rewrite any cached script in SHM; dedup only means one write &lt;br&gt;
reaches every site sharing the block, which argues for restrict_api and &lt;br&gt;
for keeping masters at a reasonable size. Write-up: &lt;br&gt;
&lt;a href="https://github.com/studio-vitalyn/php-opcache-dedup/blob/main/docs/SECURITY.md" rel="nofollow" target="_blank"&gt;https://github.com/studio-vitalyn/php-opcache-dedup/blob/main/docs/SECURITY.md&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Open questions&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Is a PR with discussion enough, or do you want an RFC for a new &lt;br&gt;
opt-in INI directive?&lt;/li&gt;
&lt;li&gt;Should the dedup table size be configurable? It is 4 slots per &lt;br&gt;
max_accelerated_files, capped at 2^20 slots (32 MB). It is 51% full in &lt;br&gt;
production, but reached 93% on a smaller host.&lt;/li&gt;
&lt;li&gt;Follow-ups such as sharing arg_info/vars and, later, the immutable part &lt;br&gt;
of class entries (about 31% of the remaining per-site memory) would &lt;br&gt;
touch the engine; I left them out to keep this change confined to &lt;br&gt;
OPcache persistence.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Patch against master (one commit, tests included): &lt;br&gt;
&lt;a href="https://github.com/php/php-src/compare/master...studio-vitalyn:php-src:opcache-dedup" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/compare/master...studio-vitalyn:php-src:opcache-dedup&lt;/a&gt; &lt;br&gt;
Backports to 8.2-8.6, benchmarks and fuzzer: &lt;br&gt;
&lt;a href="https://github.com/studio-vitalyn/php-opcache-dedup" rel="nofollow" target="_blank"&gt;https://github.com/studio-vitalyn/php-opcache-dedup&lt;/a&gt; &lt;br&gt;
Case study (benchmark and production): &lt;br&gt;
&lt;a href="https://vitalyn.com/en/blog/80-wordpress-sites-one-opcache-eleven-days-in-production/" rel="nofollow" target="_blank"&gt;https://vitalyn.com/en/blog/80-wordpress-sites-one-opcache-eleven-days-in-production/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Feedback welcome, especially from OPcache maintainers.&lt;/p&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Jean-Christophe Chenailler&lt;/p&gt;
</description><guid>C8762447-AECB-4124-9BDC-FC8DA47023FC@vitalyn.com</guid><pubDate>Tue, 10 Nov 2026 08:59:17 +0000</pubDate></item><item><title>[RFC] CSV Extension (ext/csv)</title><link>https://externals.io/message/133047</link><description>&lt;p&gt;On Thu, Oct 29, 2026 at 4:30 PM ignace nyamagana butera &lt;a href="mailto:nyamsprod@gmail.com"&gt;nyamsprod@gmail.com&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On Fri, Oct 9, 2026 at 8:22 AM Damian Jóźwiak &amp;lt; &lt;br&gt;
&lt;a href="mailto:damian.jozwiak.lodz@gmail.com" rel="nofollow" target="_blank"&gt;damian.jozwiak.lodz@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I'd like to open the discussion on an RFC proposing a dedicated CSV &lt;br&gt;
extension (ext/csv) for PHP core.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/csv_extension" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/csv_extension&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/24199" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/24199&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The proposal builds upon Gina Peter Banyard's girgias/csv extension &lt;br&gt;
(BSD-3-Clause), with additional functionality for file and stream handling.&lt;/p&gt;
&lt;p&gt;The motivation includes the deprecation of the SplFileObject CSV methods &lt;br&gt;
in PHP 8.6, which leaves certain use cases without a direct replacement.&lt;/p&gt;
&lt;p&gt;The proposed extension provides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Six functions and one class in the Csv\ namespace.&lt;/h2&gt;
&lt;h2&gt;RFC 4180-compatible parsing and serialization by default.&lt;/h2&gt;
&lt;h2&gt;Locale-independent processing without the proprietary escape &lt;br&gt;
mechanism.&lt;/h2&gt;
&lt;h2&gt;Multibyte delimiters, enclosures, and EOL sequences.&lt;/h2&gt;
&lt;h2&gt;Strict and lax collection parsing.&lt;/h2&gt;
&lt;p&gt;Lazy iteration over CSV files and streaming output.&lt;/p&gt;
&lt;p&gt;The implementation includes PHPT tests covering parsing, serialization, &lt;br&gt;
stream handling, resource lifetime, and various edge cases.&lt;/p&gt;
&lt;p&gt;The pull request's CI checks are currently passing across the tested &lt;br&gt;
platforms, including debug, ZTS, and AddressSanitizer configurations.&lt;/p&gt;
&lt;p&gt;The initial API is deliberately kept small. A more comprehensive &lt;br&gt;
object-oriented Reader/Writer API, including capability-oriented &lt;br&gt;
interfaces, is left for potential future discussion.&lt;/p&gt;
&lt;p&gt;I'd particularly appreciate feedback on the public API design, the naming &lt;br&gt;
of LazyLaxCollection, and whether the extension should be always enabled &lt;br&gt;
or optional at build time.&lt;/p&gt;
&lt;p&gt;For transparency, Gina has not reviewed or endorsed this RFC. Parts of &lt;br&gt;
the implementation were developed with LLM assistance; I have reviewed the &lt;br&gt;
code and take full responsibility for the contribution.&lt;/p&gt;
&lt;p&gt;This is an invitation for discussion, not a call for votes.&lt;/p&gt;
&lt;p&gt;Thanks in advance for your feedback.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Damian Jóźwiak&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien, &lt;br&gt;
thanks for the proposal, indeed with the deprecation of SplFileObject CSV &lt;br&gt;
feature an object oriented alternative is welcomed having said that.I have &lt;br&gt;
a couple of remarks/suggestions&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Following Tim's thought, I wonder if a CSV top namespace is &lt;br&gt;
mandatory or if we should not just have a Serialization &amp;quot;namespace&amp;quot; name &lt;br&gt;
that can be improved when such classes and functions are defined.&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;*RFC 4180-compatible parsing and serialization by default. *As much as &lt;br&gt;
I am a proponent of backing RFC whenever they exist in this case it should &lt;br&gt;
be stressed out that RFC4180 is not an accepted RFC like for instance &lt;br&gt;
RFC3986 for URI specification as such it is totally possible to have a &lt;br&gt;
valid CSV which does not comply with the refer draft specification. I &lt;br&gt;
believe this should be noted and explained in the RFC to avoid pushing &lt;br&gt;
forward something which is not a real specification as anyone would expect &lt;br&gt;
even though it is widely accepted as the &amp;quot;default&amp;quot; implementation,&lt;/h2&gt;
&lt;h2&gt;Hence why I believe that using terms like &lt;em&gt;lax&lt;/em&gt; and &lt;em&gt;strict&lt;/em&gt; is &lt;br&gt;
counter productive; probably other names &amp;quot;to be defined&amp;quot; should be used &lt;br&gt;
instead. Maybe adding an Enum With RFC4180 and something else (?) would be &lt;br&gt;
a better take. Which would reduce the number of function/methods introduced &lt;br&gt;
?&lt;/h2&gt;
&lt;p&gt;Also while it is common to talk about CSV, this feature would be &lt;br&gt;
perhaps better called &lt;em&gt;Character Separated Value&lt;/em&gt; than  Comma &lt;br&gt;
Separated Value since the delimiter can be changed. And covers TSV and &lt;br&gt;
other exotic formats which separates values per single character.&lt;/p&gt;
&lt;p&gt;The stream is owned by the object: like the stream of SplFileObject, it&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;remains visible as a resource but &lt;code&gt;fclose()&lt;/code&gt; refuses to close it, and it &lt;br&gt;
is closed when the object is destroyed (for an object alive until the end &lt;br&gt;
of the request, while destructors run, so a user wrapper's stream_close() &lt;br&gt;
is still called).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Does it mean that the LazyLaxCollection will expose the stream metadata ? &lt;br&gt;
If I receive in my method/function a  LazyLaxCollection is it possible &lt;br&gt;
for me to get access to the underlying resource metadata ? To know how it &lt;br&gt;
is open, its pathname , and so forth ? Can I easily detect if&lt;/p&gt;
&lt;p&gt;Being able to configure the context or to apply stream filter is also &lt;br&gt;
something I find useful with the current set of csv function even with &lt;br&gt;
SplFileObject (even though it is tricky with that one) I would expect any &lt;br&gt;
API which aim at replacing the current CSV API to offer at most the same &lt;br&gt;
extensibility or to allow it in any other shape or form.&lt;/p&gt;
&lt;p&gt;function collection_to_file(string $file, iterable $collection, string $delimiter = ',', string $enclosure = '&amp;quot;', string $eolSequence = &amp;quot;\r\n&amp;quot;): void {}&lt;/p&gt;
&lt;p&gt;Why? can't we have access to the written bytes as returned value. &lt;br&gt;
Otherwise it means we need to re-access the resource afterward if we want &lt;br&gt;
to get access to that value. For example if we want to generate the &lt;br&gt;
Content-Length header or something else ?&lt;/p&gt;
&lt;p&gt;Overall, I like the direction of the RFC but I believe some major &lt;br&gt;
discussion points remain unsolved before going to a vote&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Damien,&lt;/p&gt;
&lt;p&gt;It just occurred to me that I forgot to mention one point: the RFC is &lt;br&gt;
missing a section defining the supported types, similar to the one included &lt;br&gt;
in the URI Query Parameters RFC: &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/query_params#supported_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/query_params#supported_types&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I believe such a section is important to avoid surprising behaviour when &lt;br&gt;
generating CSV data.&lt;/p&gt;
&lt;p&gt;For instance, the current CSV implementation in PHP does not support &lt;br&gt;
converting objects of any kind. However, since the introduction of enums, &lt;br&gt;
both JSON serialization and &lt;code&gt;http_build_query()&lt;/code&gt; support backed enums as &lt;br&gt;
values that can be converted. I would therefore expect backed enums to be &lt;br&gt;
supported by your proposal, or at the very least for this to be explicitly &lt;br&gt;
addressed in the RFC.&lt;/p&gt;
&lt;p&gt;Conversely, resources are currently accepted during CSV conversion which we &lt;br&gt;
all agree is an unfamiliar behaviour. This RFC could therefore be a good &lt;br&gt;
opportunity to align CSV conversion with the new Query Params RFC (pending &lt;br&gt;
its acceptance) and the existing JSON conversion rules, establishing a &lt;br&gt;
common baseline for type conversion and serialization across PHP.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;PS:&lt;/em&gt; I realise this is not really the focus of your RFC, but it also &lt;br&gt;
raises the question of whether support for backed enums should be added to &lt;br&gt;
PHP's existing CSV functionality in PHP 8.7. After all, support for backed &lt;br&gt;
enums in &lt;code&gt;http_build_query()&lt;/code&gt; was introduced in PHP 8.4, rather than being &lt;br&gt;
included when enums were first introduced.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Ignace&lt;/p&gt;
</description><guid>CAOV5rgbYLcnd+HopCF7ReWZOAqXm3ACbn72LsPdrCpaHXEjmDg@mail.gmail.com</guid><pubDate>Tue, 10 Nov 2026 08:36:44 +0000</pubDate></item><item><title>[RFC] Sunset PECL</title><link>https://externals.io/message/133046</link><description>&lt;blockquote&gt;
&lt;p&gt;If the long static state is considered a problem, we can just shorten it be a year, and shutting it down a year sooner.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'd actually be fine with this. as Rowan makes a good point about long-time static unchanging deps.&lt;/p&gt;
&lt;p&gt;I'm wondering if that's actually already the case. I don't see a way (at least with my permissions) to remove an existing release from PECL in the instance it's deemed vulnerable. If that's the case the biggest impact in that particular instance is new releases that fix any vulnerabilities would only be available through PIE.&lt;/p&gt;
&lt;p&gt;I would suggest two changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a mitigation contingency to this risk: if a serious vulnerability is identified in a listed static package, we remove the affected package version(s) manually.&lt;/li&gt;
&lt;li&gt;reduce the overall timeline to 1yr, bring forward all the 2029 dates to 2027. That's 6 months of &amp;quot;heads up&amp;quot;, and 6 months of &amp;quot;read only mode plus brownouts&amp;quot; before shutdown ad the end of 2027.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If there's no strong objections to these suggestions, I'll amend the RFC to reflect that in the next couple of days&lt;/p&gt;
&lt;p&gt;Thanks &lt;br&gt;
James&lt;/p&gt;
</description><guid>b5e1890e-3057-40f3-aa76-846e2a397cd3@app.fastmail.com</guid><pubDate>Mon, 09 Nov 2026 21:07:03 +0000</pubDate></item><item><title>PHP 8.6.0RC6 scheduled for release this week</title><link>https://externals.io/message/133045</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;Following some discussion, the PHP 8.6 release managers have agreed to &lt;br&gt;
schedule an additional release candidate before the GA release of PHP &lt;br&gt;
8.6.0 next week.&lt;/p&gt;
&lt;p&gt;The php2shell fix introduced an ABI incompatibility in PHP 8.6, but not &lt;br&gt;
in older versions, which is why it was missed. Per our release policy, &lt;br&gt;
the API version number therefore needs to be bumped, requiring &lt;br&gt;
extensions to be rebuilt.&lt;/p&gt;
&lt;p&gt;There is precedent for adding an extra RC in the week before GA, as was &lt;br&gt;
done for PHP 8.5, and PHP 8.6 will follow suit.&lt;/p&gt;
&lt;p&gt;This RC will also allow us to cherry-pick a few additional fixes in time &lt;br&gt;
for PHP 8.6.0.&lt;/p&gt;
&lt;h2&gt;Best regards,&lt;/h2&gt;
&lt;p&gt;Your PHP 8.6 RMs, Matteo, Joe, and Daniel&lt;/p&gt;
</description><guid>c16a1a1c-3ef6-40a1-9ba6-e214ec5c7861@php.net</guid><pubDate>Mon, 09 Nov 2026 15:23:02 +0000</pubDate></item><item><title>[RFC] Request lifecycle hooks for SAPIs with a worker mode</title><link>https://externals.io/message/133044</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;Following the recent pre-RFC discussion &lt;br&gt;
(&lt;a href="https://news-web.php.net/php.internals/132960" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/132960&lt;/a&gt;), I would like to open &lt;br&gt;
the discussion on the &amp;quot;Request lifecycle hooks for SAPIs with a worker &lt;br&gt;
mode&amp;quot; RFC: &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/request_lifecycle_hooks" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/request_lifecycle_hooks&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As presented, this RFC proposes two optional module hooks, available &lt;br&gt;
for extensions (no userland change), which are called between requests &lt;br&gt;
served by a &amp;quot;worker&amp;quot; script.&lt;/p&gt;
&lt;p&gt;I crafted a patch adding the hooks and support PHP functions. It &lt;br&gt;
implements the hooks in the built-in standard, session and filter &lt;br&gt;
extensions: &lt;a href="https://github.com/dunglas/php-src/tree/request-boundary-hooks" rel="nofollow" target="_blank"&gt;https://github.com/dunglas/php-src/tree/request-boundary-hooks&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is also a patch showing how to use this new engine feature in &lt;br&gt;
FrankenPHP: &lt;a href="https://github.com/php/frankenphp/compare/main...experiment/php-request-boundary-hooks" rel="nofollow" target="_blank"&gt;https://github.com/php/frankenphp/compare/main...experiment/php-request-boundary-hooks&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Best,&lt;/h2&gt;
&lt;p&gt;Kévin Dunglas&lt;/p&gt;
&lt;p&gt;&lt;a href="https://dunglas.dev" rel="nofollow" target="_blank"&gt;https://dunglas.dev&lt;/a&gt;&lt;/p&gt;
</description><guid>CADU7aovTkyvuoCiHfO-+QGjHL7_tAeMHrrizRO1vaBL39yLoYQ@mail.gmail.com</guid><pubDate>Mon, 09 Nov 2026 14:24:41 +0000</pubDate></item><item><title>[RFC] Io\Terminal</title><link>https://externals.io/message/133043</link><description>&lt;p&gt;Hi Tim, Frode, and Sjoerd,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Thank you for the update. I've given the RFC another read, it's much &lt;br&gt;
more approachable now.&lt;/p&gt;
&lt;p&gt;I have another set of comments:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for the review. I've updated the RFC to version 0.6 and updated the &lt;br&gt;
PR to match (and pulled this reply to the top level of the thread so it &lt;br&gt;
doesn't stay buried in the nested October sub-thread):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/io_terminal" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/io_terminal&lt;/a&gt; &lt;br&gt;
&lt;a href="https://github.com/php/php-src/pull/23941" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/23941&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;&amp;quot;The first lease saves the POSIX terminal attributes&amp;quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Can you, for the uninformed reader, spell out what the attributes are? &lt;br&gt;
The raw-mode (or not) is obvious. Is the size also an attribute? &lt;br&gt;
Anything else?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It's the termios struct: the input, output, control and local flags (echo, &lt;br&gt;
line buffering, whether Ctrl+C raises a signal, etc.) and the control &lt;br&gt;
characters, including VMIN and VTIME. On Windows it's the console input &lt;br&gt;
mode. Size isn't part of it, and neither are the cursor position or the &lt;br&gt;
screen contents, so a resize during a lease isn't undone on restore. The &lt;br&gt;
RFC lists this now.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Would it make sense to have a getter that returns the current &lt;br&gt;
raw-mode state? This might be useful to check before calling &lt;br&gt;
&lt;code&gt;readLine()&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;I left it out because PHP can only tell whether it holds a lease, not what &lt;br&gt;
the terminal is really set to. stty or another process can change it. &lt;br&gt;
&lt;code&gt;readLine()&lt;/code&gt; already throws if a lease on the same terminal is active, even &lt;br&gt;
from another wrapper. If you think a lease-only check is still useful, I &lt;br&gt;
can add one.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="3"&gt;
&lt;li&gt;For my second example: &lt;br&gt;
[...] &lt;br&gt;
I would add a comment for the second Terminal::fromStdio()&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Done.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="4"&gt;
&lt;li&gt;For the &amp;quot;Input state and sequential reads&amp;quot; section, an example with &lt;br&gt;
two terminal instances might be useful&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Added.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="5"&gt;
&lt;li&gt;For the &amp;quot;Error Model&amp;quot;, I wonder if EOF should be returned as a key &lt;br&gt;
instead, similar to Resize.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'd keep the exception. After Resize the input is still open. After EOF &lt;br&gt;
every call returns right away, so a loop that ignores unknown keys would &lt;br&gt;
spin forever. In raw mode Ctrl+D comes in as &amp;quot;\x04&amp;quot;, so EOF only happens &lt;br&gt;
when the input is really closed. I added this to the RFC.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="6"&gt;
&lt;li&gt;It would be nice to avoid duplicating the namespace in class names. &lt;br&gt;
[...] May I suggest Terminal\Dimensions?&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed. It's Dimensions and getDimensions() now, in the RFC and the PR. &lt;br&gt;
I've also gone through your PR comments.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Raw mode is now a ModeToken lease and the size comes from getSize(), &lt;br&gt;
instead of four stty runs [...]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks again for porting tui to it. That's the most useful test the patch &lt;br&gt;
has had. getSize() is now getDimensions(), so your branch needs a small &lt;br&gt;
rename.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I would like to suggest that the RFC proceeds with a reduced scope: &lt;br&gt;
the operations userland now shells out for, and nothing that userland &lt;br&gt;
already does well.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I thought about it a lot, and I'm keeping the read methods. You're right &lt;br&gt;
that tui, php-tui and Prompts have better decoders and don't need &lt;br&gt;
readKey(). The reads are for the many small scripts that just want &amp;quot;press a &lt;br&gt;
key&amp;quot; or &amp;quot;enter password&amp;quot; without a library or stty. Symfony's &lt;br&gt;
QuestionHelper runs stty only to hide input, for example, and readSecret() &lt;br&gt;
covers that.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;readKey() returns Key|string|null with 28 keys and no modifiers, so &lt;br&gt;
none of these libraries could switch to it, and the enum cannot gain &lt;br&gt;
modifiers later without a new method beside it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed, and readKey() isn't meant to replace your decoder. The RFC now says &lt;br&gt;
so directly: no modifiers, mouse, paste or focus, nothing gets enabled on &lt;br&gt;
the terminal, and unknown sequences come back unchanged as strings. It also &lt;br&gt;
describes what tui does, a lease plus getDimensions() with its own decoder, &lt;br&gt;
as a supported way to use the API. A richer decoder should be a new API &lt;br&gt;
alongside readKey(), and your bytes-in, events-out idea sounds like the &lt;br&gt;
right shape for it. That would be its own RFC.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;readSecret() is policy [...] that prompt libraries will want to &lt;br&gt;
decide for themselves.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It is policy, and libraries can keep their own on top of raw mode. &lt;br&gt;
readSecret() is the default for people who don't want to decide.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Factories: fromStreams() is enough. [...] is there a use case that &lt;br&gt;
fromStreams(STDIN, STDOUT) does not cover?&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;The STDIN/STDOUT constants only exist in the CLI SAPI. fromStdio() uses the &lt;br&gt;
native standard handles directly, so it still works where the constants &lt;br&gt;
aren't defined, and it follows the handles if they get reopened. In a &lt;br&gt;
normal CLI script the two are the same.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Raw mode on Windows: libraries that read and write escape sequences &lt;br&gt;
need virtual terminal input (ENABLE_VIRTUAL_TERMINAL_INPUT) and output &lt;br&gt;
processing. [...] Could raw mode specify them, or take an option for &lt;br&gt;
them?&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Raw mode leaves both flags as they are. For output there's already &lt;br&gt;
sapi_windows_vt100_support(). VT input is a real gap, since PHP can't set &lt;br&gt;
it today. An option on enableRawMode() can be added later without breaking &lt;br&gt;
anything. I'd rather get that right with real Windows users than guess now, &lt;br&gt;
but if you think it should block the RFC, let me know.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Ctrl+C: some programs want raw input but Ctrl+C still delivered as &lt;br&gt;
a signal.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed. That fits as an optional argument later.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="4"&gt;
&lt;li&gt;Resize: with readKey() out, Key::Resize goes too.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Since readKey() stays, Key::Resize stays with it. Without readKey(), &lt;br&gt;
&lt;code&gt;SIGWINCH&lt;/code&gt; plus getDimensions() works as you describe, and getDimensions() &lt;br&gt;
doesn't swallow a pending Resize.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I am happy to test further revisions with tui.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That would be great, thanks.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Perhaps it would be desirable to distinguish between the user &lt;br&gt;
cancelling, and a genuine error, and perhaps also EOF; for example &lt;br&gt;
with subclasses of TerminalException.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I said I wanted to settle this before the vote. I've decided not to add &lt;br&gt;
them in this RFC. Subclasses of TerminalException can be added later &lt;br&gt;
without breaking anything, because existing catch blocks keep working, and &lt;br&gt;
I'd rather add them once real code shows which distinctions people need.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Is this sufficiently long, even when used over SSH or such? Is this &lt;br&gt;
configurable in readSecret as well?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To fix this, I added $sequenceTimeout to readSecret() as well, matching &lt;br&gt;
readKey(). Callers on high-latency links can pass a longer duration if &lt;br&gt;
needed, rather than being stuck with the 25 ms default.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Pratik&lt;/p&gt;
</description><guid>CA+9BsNfrK+SfzsNm8FmmN3+KZd_bVD0RcTujRqiu19n+HpDYEA@mail.gmail.com</guid><pubDate>Mon, 09 Nov 2026 13:56:42 +0000</pubDate></item><item><title>[RFC] Io\Terminal</title><link>https://externals.io/message/133042</link><description>&lt;p&gt;Hi Tim, Frode and Sjoerd,&lt;/p&gt;
&lt;p&gt;I've updated the RFC to 0.6:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/io_terminal" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/io_terminal&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I'm replying to all three of you in one mail so the discussion points &lt;br&gt;
stay in one place.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;&amp;quot;The first lease saves the POSIX terminal attributes&amp;quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Can you, for the uninformed reader, spell out what the attributes are? &lt;br&gt;
The raw-mode (or not) is obvious. Is the size also an attribute? &lt;br&gt;
Anything else?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It's the termios struct: the input, output, control and local flags &lt;br&gt;
(echo, line buffering, whether Ctrl+C raises a signal, etc.) and the &lt;br&gt;
control characters, including VMIN and VTIME. On Windows it's the &lt;br&gt;
console input mode. Size isn't part of it, and neither are the cursor &lt;br&gt;
position or the screen contents, so a resize during a lease isn't &lt;br&gt;
undone on restore. The RFC lists this now.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Would it make sense to have a getter that returns the current &lt;br&gt;
raw-mode state? This might be useful to check before calling &lt;br&gt;
&lt;code&gt;readLine()&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;I left it out because PHP can only tell whether it holds a lease, not &lt;br&gt;
what the terminal is really set to. stty or another process can change &lt;br&gt;
it. &lt;code&gt;readLine()&lt;/code&gt; already throws if a lease on the same terminal is &lt;br&gt;
active, even from another wrapper. If you think a lease-only check is &lt;br&gt;
still useful, I can add one.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="3"&gt;
&lt;li&gt;For my second example: &lt;br&gt;
[...] &lt;br&gt;
I would add a comment for the second &lt;code&gt;Terminal::fromStdio()&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Done.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="4"&gt;
&lt;li&gt;For the &amp;quot;Input state and sequential reads&amp;quot; section, an example with &lt;br&gt;
two terminal instances might be useful&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Added.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="5"&gt;
&lt;li&gt;For the &amp;quot;Error Model&amp;quot;, I wonder if EOF should be returned as a key &lt;br&gt;
instead, similar to &lt;code&gt;Resize&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'd keep the exception. After Resize the input is still open. After EOF &lt;br&gt;
every call returns right away, so a loop that ignores unknown keys &lt;br&gt;
would spin forever. In raw mode Ctrl+D comes in as &amp;quot;\x04&amp;quot;, so EOF only &lt;br&gt;
happens when the input is really closed. I added this to the RFC.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="6"&gt;
&lt;li&gt;It would be nice to avoid duplicating the namespace in class names. &lt;br&gt;
[...] May I suggest &lt;code&gt;Terminal\Dimensions&lt;/code&gt;?&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed. It's Dimensions and getDimensions() now, in the RFC and the PR. &lt;br&gt;
I've also gone through your PR comments.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Raw mode is now a ModeToken lease and the size comes from getSize(), &lt;br&gt;
instead of four stty runs [...]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks again for porting tui to it. That's the most useful test the &lt;br&gt;
patch has had. getSize() is now getDimensions(), so your branch needs a &lt;br&gt;
small rename.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I would like to suggest that the RFC proceeds with a reduced scope: &lt;br&gt;
the operations userland now shells out for, and nothing that userland &lt;br&gt;
already does well.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I thought about it a lot, and I'm keeping the read methods. You're &lt;br&gt;
right that tui, php-tui and Prompts have better decoders and don't need &lt;br&gt;
readKey(). The reads are for the many small scripts that just want &lt;br&gt;
&amp;quot;press a key&amp;quot; or &amp;quot;enter password&amp;quot; without a library or stty. Symfony's &lt;br&gt;
QuestionHelper runs stty only to hide input, for example, and &lt;br&gt;
readSecret() covers that.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;readKey() returns Key|string|null with 28 keys and no modifiers, so &lt;br&gt;
none of these libraries could switch to it, and the enum cannot gain &lt;br&gt;
modifiers later without a new method beside it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed, and readKey() isn't meant to replace your decoder. The RFC now &lt;br&gt;
says so directly: no modifiers, mouse, paste or focus, nothing gets &lt;br&gt;
enabled on the terminal, and unknown sequences come back unchanged as &lt;br&gt;
strings. It also describes what tui does, a lease plus getDimensions() &lt;br&gt;
with its own decoder, as a supported way to use the API. A richer decoder &lt;br&gt;
should be a new API alongside readKey(), and your bytes-in, events-out idea &lt;br&gt;
sounds like the right shape for it. That would be its own RFC.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;readSecret() is policy [...] that prompt libraries will want to &lt;br&gt;
decide for themselves.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It is policy, and libraries can keep their own on top of raw mode. &lt;br&gt;
readSecret() is the default for people who don't want to decide.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Factories: fromStreams() is enough. [...] is there a use case that &lt;br&gt;
fromStreams(STDIN, STDOUT) does not cover?&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;The STDIN/STDOUT constants only exist in the CLI SAPI. fromStdio() &lt;br&gt;
uses the native standard handles directly, so it still works where the &lt;br&gt;
constants aren't defined, and it follows the handles if they get &lt;br&gt;
reopened. In a normal CLI script the two are the same.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Raw mode on Windows: libraries that read and write escape sequences &lt;br&gt;
need virtual terminal input (ENABLE_VIRTUAL_TERMINAL_INPUT) and output &lt;br&gt;
processing. [...] Could raw mode specify them, or take an option for &lt;br&gt;
them?&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Raw mode leaves both flags as they are. For output there's already &lt;br&gt;
sapi_windows_vt100_support(). VT input is a real gap, since PHP can't &lt;br&gt;
set it today. An option on enableRawMode() can be added later without &lt;br&gt;
breaking anything. I'd rather get that right with real Windows users &lt;br&gt;
than guess now, but if you think it should block the RFC, let me know.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Ctrl+C: some programs want raw input but Ctrl+C still delivered as &lt;br&gt;
a signal.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed. That fits as an optional argument later.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="4"&gt;
&lt;li&gt;Resize: with readKey() out, Key::Resize goes too.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Since readKey() stays, Key::Resize stays with it. Without readKey(), &lt;br&gt;
&lt;code&gt;SIGWINCH&lt;/code&gt; plus getDimensions() works as you describe, and &lt;br&gt;
getDimensions() doesn't swallow a pending Resize.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I am happy to test further revisions with tui.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That would be great, thanks.&lt;/p&gt;
&lt;p&gt;Two things I said I'd come back to.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Perhaps it would be desirable to distinguish between the user &lt;br&gt;
cancelling, and a genuine error, and perhaps also EOF; for example &lt;br&gt;
with subclasses of TerminalException.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I said I wanted to settle this before the vote. I've decided not to &lt;br&gt;
add them in this RFC. Subclasses of TerminalException can be added &lt;br&gt;
later without breaking anything, because existing catch blocks keep &lt;br&gt;
working, and I'd rather add them once real code shows which &lt;br&gt;
distinctions people need.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Is this sufficiently long, even when used over SSH or such? Is this &lt;br&gt;
configurable in readSecret as well?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To fix this, I added $sequenceTimeout to readSecret() as well, matching &lt;br&gt;
readKey(). Callers on high-latency links can pass a longer duration &lt;br&gt;
if needed, rather than being stuck with the 25 ms default.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Pratik&lt;/p&gt;
</description><guid>CA+9BsNdgxenBgv3Kxrpp9JoYEOe_bGXvtm8urtpuBD7WfQi8Fg@mail.gmail.com</guid><pubDate>Mon, 09 Nov 2026 05:45:56 +0000</pubDate></item><item><title>[RFC] Io\Terminal</title><link>https://externals.io/message/133041</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I've updated the Io\Terminal RFC to version 0.5:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/io_terminal" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/io_terminal&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It adds examples for raw-mode leases and sequential reads, clarifies &lt;br&gt;
lease restoration, escape-sequence timeouts, resize notifications, and &lt;br&gt;
line endings, and marks enableRawMode() as NoDiscard.&lt;/p&gt;
&lt;p&gt;The PR has been updated to match, and its CI checks are green:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/php/php-src/pull/23941" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/23941&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As mentioned earlier, I'm holding off on voting while the discussion continues.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thank you for the update. I've given the RFC another read, it's much &lt;br&gt;
more approachable now.&lt;/p&gt;
&lt;p&gt;I have another set of comments:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;“The first lease saves the POSIX terminal attributes”&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Can you, for the uninformed reader, spell out what the attributes are? &lt;br&gt;
The raw-mode (or not) is obvious. Is the size also an attribute? &lt;br&gt;
Anything else?&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;
&lt;p&gt;Would it make sense to have a getter that returns the current &lt;br&gt;
raw-mode state? This might be useful to check before calling &lt;code&gt;readLine()&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For my second example:&lt;/p&gt;
&lt;p&gt;$terminal = Terminal::fromStdio(); &lt;br&gt;
$lease = $terminal-&amp;gt;enableRawMode(); &lt;br&gt;
unset($terminal); // The lease is still active.&lt;/p&gt;
&lt;p&gt;$terminal = Terminal::fromStdio(); &lt;br&gt;
$terminal-&amp;gt;restoreMode($lease);&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I would add a comment for the second &lt;code&gt;Terminal::fromStdio()&lt;/code&gt;: “Starts in &lt;br&gt;
raw mode, because the mode lease is active” to be extra explicit about &lt;br&gt;
the behavior.&lt;/p&gt;
&lt;ol start="4"&gt;
&lt;li&gt;
&lt;p&gt;For the “Input state and sequential reads” section, an example with &lt;br&gt;
two terminal instances might be useful to showcase how two distinct &lt;br&gt;
instances interact with each other.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For the “Error Model”, I wonder if EOF should be returned as a key &lt;br&gt;
instead, similar to &lt;code&gt;Resize&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It would be nice to avoid duplicating the namespace in class names. &lt;br&gt;
Specifically I'm thinking about &lt;code&gt;Terminal\TerminalSize&lt;/code&gt;. May I suggest &lt;br&gt;
&lt;code&gt;Terminal\Dimensions&lt;/code&gt;? It avoids a bare “Size” when using unqualified &lt;br&gt;
and is also a little more precise in what is being returned by it. The &lt;br&gt;
getter would then also be called &lt;code&gt;getDimensions()&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>d663510d-0191-4833-a394-1dc36598fd39@bastelstu.be</guid><pubDate>Sun, 08 Nov 2026 18:18:44 +0000</pubDate></item><item><title>Floating point on 32-bit x86: x87 precision (XPFPA) and fpmath=sse</title><link>https://externals.io/message/133040</link><description>&lt;p&gt;On Sun, Nov 8, 2026, at 14:17, &lt;a href="mailto:marc@mabe.berlin" rel="nofollow" target="_blank"&gt;marc@mabe.berlin&lt;/a&gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Can we enable &lt;code&gt;-msse2 -mfpmath=sse&lt;/code&gt; by default on x86 (require SSE2).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes. As I understand it we are not really interested in supporting actual 32 bit hardware, but running 32 bit builds on WASM or to save memory. So breaking compatibility with old CPUs seems fair.&lt;/p&gt;
&lt;p&gt;I think Windows already requires SSE2?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Sjoerd Langkemper&lt;/p&gt;
</description><guid>393aa697-110c-4d6f-abe2-5cdf05a161c7@app.fastmail.com</guid><pubDate>Sun, 08 Nov 2026 14:25:16 +0000</pubDate></item><item><title>Floating point on 32-bit x86: x87 precision (XPFPA) and fpmath=sse</title><link>https://externals.io/message/133039</link><description>&lt;blockquote&gt;
&lt;p&gt;Can we enable &lt;code&gt;-msse2 -mfpmath=sse&lt;/code&gt; by default on x86 (require SSE2). &lt;br&gt;
WDYT?&lt;/p&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Marc Bennewitz&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hell yes. x86 CPUs lacking SSE2 are nearly 30 years old at this point (1999 &lt;br&gt;
Pentium 3?)&lt;/p&gt;
&lt;p&gt;Do not waste effort keeping them supported.&lt;/p&gt;
</description><guid>CAJmy8YFXHC92byzENKD8YfG2ggukrumAA_nyAROU65RKUA+3xw@mail.gmail.com</guid><pubDate>Sun, 08 Nov 2026 14:07:07 +0000</pubDate></item><item><title>Floating point on 32-bit x86: x87 precision (XPFPA) and fpmath=sse</title><link>https://externals.io/message/133038</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;While working on 64-bit integers for 32-bit platforms [1], I found floating point results that differ only on 32-bit x86. I would like to reduce the platform differences where PHP is running as much as possible.&lt;/p&gt;
&lt;p&gt;Why i386 differs from amd64, arm64 and arm32&lt;/p&gt;
&lt;p&gt;On amd64 (SSE2), arm64 and arm32 (VFP), the compiler computes &lt;code&gt;double&lt;/code&gt; arithmetic in IEEE-754 binary64: 53-bit mantissa, 11-bit exponent, one rounding per operation. &lt;br&gt;
On i386, compilers use the x87 FPU by default. Its registers have a 64-bit mantissa and a 15-bit exponent, and values are rounded to double only when they are stored to memory.&lt;/p&gt;
&lt;p&gt;To get closer to binary64, zend_init_fpu() sets the x87 precision to 53 bits for every request (the XPFPA macros in Zend/zend_float.h). That leaves two differences from the other three platforms:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;libm runs with the reduced precision too. glibc's i386 &lt;code&gt;pow()&lt;/code&gt;, &lt;code&gt;exp()&lt;/code&gt;, &lt;code&gt;expm1()&lt;/code&gt;, &lt;code&gt;sinh()&lt;/code&gt; etc. compute on the x87 unit and need its extended precision to round their result correctly. Inside PHP they lose it, so they are much less accurate than the same functions outside PHP.&lt;/li&gt;
&lt;li&gt;Only the mantissa is reduced, not the exponent. A result in the subnormal range (below PHP_FLOAT_MIN) is rounded once in the wide register and again when stored, and can end up one ULP off.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In both cases i386 is less accurate compared to the other platforms.&lt;/p&gt;
&lt;p&gt;Part 1: libm accuracy -- XPFPA wrappers&lt;/p&gt;
&lt;p&gt;#23578  &lt;code&gt;pow()&lt;/code&gt;, ** and &lt;code&gt;fpow()&lt;/code&gt;  &lt;a href="https://github.com/php/php-src/pull/23578" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/23578&lt;/a&gt; &lt;br&gt;
#23579  &lt;code&gt;exp()&lt;/code&gt;                 &lt;a href="https://github.com/php/php-src/pull/23579" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/23579&lt;/a&gt; &lt;br&gt;
#23581  &lt;code&gt;expm1()&lt;/code&gt;               &lt;a href="https://github.com/php/php-src/pull/23581" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/23581&lt;/a&gt; &lt;br&gt;
#23582  &lt;code&gt;sinh()&lt;/code&gt;                &lt;a href="https://github.com/php/php-src/pull/23582" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/23582&lt;/a&gt; &lt;br&gt;
Examples on i386 today: &lt;br&gt;
var_dump(10 ** -2);          // float(0.010000000000000002) vs float(0.01) &lt;br&gt;
var_dump(10 ** -2 === 0.01); // false on i386, true on amd64/arm64 &lt;br&gt;
var_dump(exp(10));           // float(22026.465794806725) vs ...718&lt;/p&gt;
&lt;p&gt;Each PR adds a small inline helper to Zend/zend_float.h (zend_pow(), zend_exp(), zend_expm1(), zend_sinh()). It switches the FPU to extended precision for the libm call and rounds the result back to double. Where XPFPA_HAVE_CW is 0 -- amd64, arm64, arm32 -- the helper compiles to the plain libm call, so nothing changes there.&lt;/p&gt;
&lt;p&gt;With the PRs, nearly all results I checked on i386 are correctly rounded, compared to roughly one in ten before. It is not a guarantee: &lt;br&gt;
a few inputs stay wrong, and one gets 1 ULP worse. Each PR's test contains inputs that are wrong on i386 today and correct with the change.&lt;/p&gt;
&lt;p&gt;Cost: two fnstcw/fldcw pairs per call. Measured on an x86_64 Linux host running the i386 build (-m32 -msse2), JIT off. Each function was called 1,000,000 times in a loop, repeated 15 times, and the median time per call is used: &lt;br&gt;
function        cost added per call &lt;br&gt;
&lt;code&gt;exp()&lt;/code&gt;           ~5-7 ns    (~5% of the libm call) &lt;br&gt;
&lt;code&gt;expm1()&lt;/code&gt;         ~5-7 ns &lt;br&gt;
&lt;code&gt;sinh()&lt;/code&gt;          ~4 ns &lt;br&gt;
**, &lt;code&gt;fpow()&lt;/code&gt;      ~3-8 ns&lt;/p&gt;
&lt;p&gt;JIT should not need any changes: as far as I can see it has no implementation of its own for these functions or for &lt;code&gt;**&lt;/code&gt;. It calls the regular function handlers, and &lt;code&gt;**&lt;/code&gt; goes through pow_function() and from there zend_pow(). Compile-time evaluation calls the same handlers. Is this assumption correct, or is there a path I missed?&lt;/p&gt;
&lt;p&gt;Part 2: subnormal double rounding -- SSE2 instead of x87&lt;/p&gt;
&lt;p&gt;The wrappers can't fix the second problem, as it happens in PHP's own arithmetic: &lt;br&gt;
$a = 5.678650331314532e-158; &lt;br&gt;
$b = 2.3715405351663569e-153; &lt;br&gt;
var_dump($a * $b); &lt;br&gt;
// i386 (x87):          1.34671494457485E-310 &lt;br&gt;
// amd64, arm64, arm32: 1.3467149445748E-310  (correctly rounded)&lt;/p&gt;
&lt;p&gt;Normal-range results are identical; only some results below &lt;code&gt;PHP_FLOAT_MIN&lt;/code&gt; differ. &lt;br&gt;
Compiling with &lt;code&gt;-msse2 -mfpmath=sse&lt;/code&gt; makes i386 compute in binary64 like the other platforms and removes the difference.&lt;/p&gt;
&lt;p&gt;Unlike the other SIMD code in php-src, which falls back to scalar code or picks an implementation at run time, the floating point unit is fixed at compile time and crashes with &lt;br&gt;
&lt;code&gt;SIGILL&lt;/code&gt; on a CPU without SSE2.&lt;/p&gt;
&lt;p&gt;This doesn't make Part 1 unnecessary: zend_init_fpu() still reduces the x87 precision, and the system's i386 libm still runs on x87.&lt;/p&gt;
&lt;p&gt;The PRs are open for some time already without any comments - comments welcome! &lt;br&gt;
Can we enable &lt;code&gt;-msse2 -mfpmath=sse&lt;/code&gt; by default on x86 (require SSE2). &lt;br&gt;
WDYT?&lt;/p&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Marc Bennewitz&lt;/p&gt;
</description><guid>2014322625.835969.1794143875789@app.mailbox.org</guid><pubDate>Sun, 08 Nov 2026 13:17:55 +0000</pubDate></item><item><title>[RFC] Sunset PECL</title><link>https://externals.io/message/133037</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I'd like to introduce an RFC to lay out a timeline to sunset PECL and open it for discussion.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Have a longer interim stage, where functionality is limited, and deprecation clearly flagged, before going fully read-only.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For instance, registration of new packages could be disabled,&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It already is.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;and perhaps restrictions placed on version numbers - e.g. allow Swoole 6.1.13 and 6.2.6 as patching existing series, but force 6.3.0 to be PIE only.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This will likely mean changing the peclweb code, and that's something we really shouldn't want to do. Nobody knows the code and it's decades behind the times.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We could also restrict packages from listing compatibility with new PHP versions - there's probably no reason for anyone to use PECL to install anything on PHP 8.7 / 9.0.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Same&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Establish a process up front for package maintainers to request publication of security releases, with only a small number of users granted write access.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;As Andrew points out, if it's suitably restricted, this security process doesn't need to use the same automation as the original system, it just needs a way for trusted user to manually upload the releases.&lt;/p&gt;
&lt;p&gt;What do you think?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If the long static state is considered a problem, we can just shorten it be a year, and shutting it down a year sooner.&lt;/p&gt;
&lt;p&gt;cheers &lt;br&gt;
Derick&lt;/p&gt;
</description><guid>AABF9E2D-1D7D-4C11-B459-63E0A474CB25@php.net</guid><pubDate>Sat, 07 Nov 2026 20:38:39 +0000</pubDate></item><item><title>[RFC] Sunset PECL</title><link>https://externals.io/message/133036</link><description>&lt;blockquote&gt;
&lt;p&gt;I'd like to introduce an RFC to lay out a timeline to sunset PECL and &lt;br&gt;
open it for discussion.&lt;/p&gt;
&lt;p&gt;RFC text is at &lt;a href="https://wiki.php.net/rfc/sunset_pecl" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/sunset_pecl&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi James,&lt;/p&gt;
&lt;p&gt;Thanks for moving this forward. I have a slight concern with the long &lt;br&gt;
gap between going fully read-only (mid-2027) and retiring the repository &lt;br&gt;
(end of 2029).&lt;/p&gt;
&lt;p&gt;In one of the PEAR threads, I linked this blog post by Andrew Nesbitt &lt;br&gt;
where he points out the risk of freezing a package which turns out to &lt;br&gt;
contain a vulnerability: &lt;br&gt;
&lt;a href="https://nesbitt.io/2026/06/23/sunsetting-a-package-manager.html" rel="nofollow" target="_blank"&gt;https://nesbitt.io/2026/06/23/sunsetting-a-package-manager.html&lt;/a&gt; In the &lt;br&gt;
current environment, two and a half years seems a long time to serve &lt;br&gt;
something nobody can patch.&lt;/p&gt;
&lt;p&gt;I think there are two ways we could lessen that risk:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Have a longer interim stage, where functionality is limited, and &lt;br&gt;
deprecation clearly flagged, before going fully read-only.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For instance, registration of new packages could be disabled, and &lt;br&gt;
perhaps restrictions placed on version numbers - e.g. allow Swoole &lt;br&gt;
6.1.13 and 6.2.6 as patching existing series, but force 6.3.0 to be PIE &lt;br&gt;
only.&lt;/p&gt;
&lt;p&gt;We could also restrict packages from listing compatibility with new PHP &lt;br&gt;
versions - there's probably no reason for anyone to use PECL to install &lt;br&gt;
anything on PHP 8.7 / 9.0.&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Establish a process up front for package maintainers to request &lt;br&gt;
publication of security releases, with only a small number of users &lt;br&gt;
granted write access.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;As Andrew points out, if it's suitably restricted, this security process &lt;br&gt;
doesn't need to use the same automation as the original system, it just &lt;br&gt;
needs a way for trusted user to manually upload the releases.&lt;/p&gt;
&lt;p&gt;What do you think?&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
Rowan Tommins &lt;br&gt;
[IMSoP]&lt;/p&gt;
</description><guid>940e249c-8e1a-46a2-8332-b500951abb47@rwec.co.uk</guid><pubDate>Sat, 07 Nov 2026 15:55:40 +0000</pubDate></item><item><title>[RFC] Sunset PECL</title><link>https://externals.io/message/133035</link><description>&lt;blockquote&gt;
&lt;p&gt;I don't know what the usage stats are like, as we don't collect any &lt;br&gt;
metrics on PIE side, but it's definitely getting some usage. Perhaps we &lt;br&gt;
should start promoting that a little more, and remove the &amp;quot;experimental&amp;quot; &lt;br&gt;
flag, as it does indeed help that pre-PHP 8.1 issue.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;PIE doesnt, but packagist does &lt;a href="https://packagist.org/extensions" rel="nofollow" target="_blank"&gt;https://packagist.org/extensions&lt;/a&gt;&lt;/p&gt;
</description><guid>CAO__Xv4z-g_TsQ9w6qnxnXFq_pf5U9G=uhoYROfFfFyrB7qw3A@mail.gmail.com</guid><pubDate>Fri, 06 Nov 2026 16:49:33 +0000</pubDate></item><item><title>[RFC] Scope</title><link>https://externals.io/message/133034</link><description>&lt;p&gt;Hi Larry,&lt;/p&gt;
&lt;p&gt;Thanks for going through it in this much detail. I've updated the RFC to 0.9.5 with the clarifications you asked for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the rule that a scope is bound when a call, fiber or generator is created;&lt;/li&gt;
&lt;li&gt;why a scope has no parent link;&lt;/li&gt;
&lt;li&gt;a run() example with partial application;&lt;/li&gt;
&lt;li&gt;statics and $GLOBALS mentioned in the introduction.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The proposal itself is unchanged.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/scope" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/scope&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On superglobals starting empty: your legacyLogic() example breaks because it creates a scope. Code that should see the current request doesn't need to: it already runs in the request's scope, and so does every fiber it starts. You create a scope when you start a new unit of work, in practice a new request inside a long-running server. If a new scope inherited its creator's arrays, the server would have to clear them for every request, and one it missed would leak into the next request. A copy would also be shallow: an object stored in $_REQUEST or $_SESSION would be the same instance in both scopes.&lt;/p&gt;
&lt;p&gt;On request data in statics: that code is already wrong under FrankenPHP's worker mode, RoadRunner and Swoole, whether or not this RFC passes. Scope doesn't make it wrong; it gives that code a key to move the data to.&lt;/p&gt;
&lt;p&gt;On the WeakMap boilerplate: I see scoped services as the container's job. Most application code never touches Scope. The server creates the scopes, and the container keys its scoped services by them, as &lt;a href="http://ASP.NET" rel="nofollow" target="_blank"&gt;ASP.NET&lt;/a&gt; Core's container and Spring's scoped proxies do. Your ConnectionProxy is that pattern, written once in the container or the DBAL rather than in every application. I've mentioned an attribute like #[Scoped] under Future Scope, for when containers have settled on a common pattern.&lt;/p&gt;
&lt;p&gt;On the turtles: they stop at the server. It creates the request's scope and puts the request into it, through $_SERVER under vote A or through the framework's own request holder keyed by the scope. Your ConnectionMaker reads it from there, and everything above it stays a singleton.&lt;/p&gt;
&lt;p&gt;On a keyword: I'd rather not. Outside containers and servers, Scope::getCurrent() should be rare.&lt;/p&gt;
&lt;p&gt;Places to point people to: .NET's AddScoped() with IServiceScopeFactory, Spring's @RequestScope with scoped proxies, Python's contextvars and Node's AsyncLocalStorage.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Frode Børli&lt;/p&gt;
</description><guid>179398070922.2556813.16178026020561357320@ennerd.com</guid><pubDate>Fri, 06 Nov 2026 15:58:29 +0000</pubDate></item><item><title>[RFC] Prepared Literal String Matching and Replacement</title><link>https://externals.io/message/133033</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I'd like to open discussion on this RFC: &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/prepared_literal_string_matching" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/prepared_literal_string_matching&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It proposes Str\Matcher and Str\Replacer for prepared literal substring &lt;br&gt;
search and replacement. Matcher provides presence checks, unique matched &lt;br&gt;
keywords, occurrence counts, and enumeration of all overlapping matches &lt;br&gt;
with byte offsets, using Str\MatchResult objects. Replacer performs &lt;br&gt;
non-overlapping replacements, choosing the earliest start and then the &lt;br&gt;
longest key, without rescanning inserted text.&lt;/p&gt;
&lt;p&gt;Both classes prepare an immutable dictionary during construction. &lt;br&gt;
Matching is byte-oriented, binary-safe, and case-sensitive. Objects can be &lt;br&gt;
reused within a request or in long-running applications.&lt;/p&gt;
&lt;p&gt;I've implemented the API and published reproducible benchmarks covering &lt;br&gt;
both prepared calls and one-shot use, including construction and destruction. &lt;br&gt;
Preparation can pay off even for a single call on some inputs. On others, &lt;br&gt;
existing PHP functions or PCRE remain faster, even than a prepared object.&lt;/p&gt;
&lt;p&gt;I propose including these classes in ext/standard in the Str namespace. &lt;br&gt;
The current implementation is in ext/strmatch. I'd welcome feedback on &lt;br&gt;
the API, integration, error types, and whether Matcher and Replacer &lt;br&gt;
should be considered together or separately.&lt;/p&gt;
&lt;p&gt;Implementation: &lt;br&gt;
&lt;a href="https://github.com/php/php-src/pull/25122" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/25122&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Benchmarks, methodology and raw data: &lt;br&gt;
&lt;a href="https://github.com/ArtUkrainskiy/php-src-bench/tree/main/reports/multi-pattern-search" rel="nofollow" target="_blank"&gt;https://github.com/ArtUkrainskiy/php-src-bench/tree/main/reports/multi-pattern-search&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
Best regards, &lt;br&gt;
Artem Ukrainskiy&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This looks interesting, and I'm not opposed to it.  It somewhat parallels the recently discussed Pcre class.&lt;/p&gt;
&lt;p&gt;My main question is that this feels very niche.  Based on the benchmarks, if I'm reading them correctly, it sounds like 90% of uses would be better served with the existing APIs.  Does this make sense for stdlib then?  It would be helpful to include more practical examples of where I'd want to use this instead of &lt;code&gt;str_contains()&lt;/code&gt;, rather than just a table of byte counts.  The &amp;quot;Where the API can help&amp;quot; section isn't sufficient as-is.&lt;/p&gt;
&lt;p&gt;For example... would this pay off in a long-running process like FrankenPHP or Swoole, if the object is saved between requests?&lt;/p&gt;
&lt;p&gt;Other issues:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Matcher::matchAll() returns a list, but each of the items in it contains, I believe, a unique value.  Could it then return a keyed array for easier lookup?  (The example suggests I may be wrong, but if so, please spell this out explicitly.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The inout $count argument to Replacer::replace(): Eew.  Please explore a better way of handling that.  inout params in a language like PHP are the absolute last resort.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I'm not clear if it says explicitly anywhere if there's behavioral differences from the existing functions.  If so it wasn't clear.  Would swapping Replacer in for &lt;code&gt;strtr()&lt;/code&gt; require any subtle logic changes, or is it a drop-in syntax change?  That should be made explicit.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;quot;Reinitializing an already prepared object throws an Error, even if its dictionary is empty.&amp;quot; - How would one reinitialize it?  Do you mean calling the constructor explicitly, which PHP allows even though it's never ever safe to do anyway? :-)  If so, please clarify that's what you mean.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&amp;quot;two distinct objects compare unequal with ==, even if their dictionaries are identical. &amp;quot; - I disagree with this.  The whole point of == on objects is to ask &amp;quot;are these equivalent,&amp;quot; and two Matchers with the same dictionary are equivalent.  Thus they should be ==.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The RFC notes that these routines are byte-based only, which is fine, as that's what most of PHP is.  However, is there a use for a Unicode/Grapheme equivalent?  Even if future scope, it's worth mentioning.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In &amp;quot;Design choices,&amp;quot; you list how existing implementations in other languages differ.  Please also explain why you've chosen to not follow the same semantics as one of the existing tools, as that means someone moving from those languages to PHP is going to be easily confused by the edge cases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In &amp;quot;Where existing tools are preferable&amp;quot;, there's a broken link in the 2nd paragraph.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;These are closely related enough that I think a single vote is fine.  There's no need to separate them.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>72fb2976-448c-4cf6-af73-ea6dffd9a942@app.fastmail.com</guid><pubDate>Fri, 06 Nov 2026 15:53:12 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133032</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Context Managers RFC, Arnaud and I have a new approach to present:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/context-managers-v2" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/context-managers-v2&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks. It looks promising.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When the using expression ends, VAR is explicitly unset().&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What happens when VAR was already defined before the context? Is it &lt;br&gt;
masked and restored, or overwritten and unset?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;At the moment, in v2 it's overwritten and unset.  We can bring back the mask/restore logic if there's interest, but we're not entirely convinced it's needed so left it out of this version for now.  (Basically, if you're reusing a variable like that, you know that it's not going to be what it was before.  If you do so accidentally, then your function is too long for you to keep in your head and you need to refactor anyway.)&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;what the return value of a combined using block should be&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I would say the return value of the outer-most / left-most context &lt;br&gt;
manager. That is equivalent to the nested form.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That's my thinking as well, but we wanted to get input from the Crowd(tm).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The compact comma separated syntax could also be added later, so if &lt;br&gt;
this is a difficult point it is also possible to remove this from the &lt;br&gt;
RFC and add it later on.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;True, though it doesn't seem controversial so I'd rather include it if we can.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;public function transaction(): self&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Should the return type be Generator here?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yep, it should.  Fixed now, thanks.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>05edbe2e-1ec5-4057-aa02-793951c846f8@app.fastmail.com</guid><pubDate>Fri, 06 Nov 2026 15:03:24 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133031</link><description>&lt;blockquote&gt;
&lt;p&gt;Am 05.11.2026, 18:33:14 schrieb Larry Garfield &lt;a href="mailto:larry@garfieldtech.com"&gt;larry@garfieldtech.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi folks.  Based on the feedback and problems with the previous Context Managers RFC, Arnaud and I have a new approach to present:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/context-managers-v2" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/context-managers-v2&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;trying to understand, can you implement the file_for_write method in &lt;br&gt;
the code sample to its more clear how that creates a generator?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I added a basic implementation to the intro section.  Arguably I'd clean it up further and refine it for a real function, but I kept it parallel to the example to make it clearer what is going on.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>76376af2-8382-4d3d-81ba-35bcd586f998@app.fastmail.com</guid><pubDate>Fri, 06 Nov 2026 14:53:57 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133030</link><description>&lt;blockquote&gt;
&lt;p&gt;Context Managers RFC, Arnaud and I have a new approach to present:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/context-managers-v2" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/context-managers-v2&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks. It looks promising.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When the using expression ends, VAR is explicitly unset().&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What happens when VAR was already defined before the context? Is it masked and restored, or overwritten and unset?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;what the return value of a combined using block should be&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I would say the return value of the outer-most / left-most context manager. That is equivalent to the nested form. &lt;br&gt;
The compact comma separated syntax could also be added later, so if this is a difficult point it is also possible to remove this from the RFC and add it later on.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;public function transaction(): self&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Should the return type be Generator here?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Sjoerd&lt;/p&gt;
</description><guid>4f5a0de9-a05a-43ba-8084-a41567f87673@app.fastmail.com</guid><pubDate>Fri, 06 Nov 2026 14:51:37 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133029</link><description>&lt;blockquote&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Please remember to bottom post, not top post.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I agree that &lt;code&gt;as&lt;/code&gt; seems more coherent than &lt;code&gt;=&amp;gt;&lt;/code&gt; in PHP. The only time I &lt;br&gt;
saw &lt;code&gt;=&amp;gt;&lt;/code&gt; in PHP was with key =&amp;gt; value. And in JS it was with &lt;code&gt;() =&amp;gt; {}&lt;/code&gt; &lt;br&gt;
functions.&lt;/p&gt;
&lt;p&gt;I have another question. This mechanism of Context Manager, Is it the &lt;br&gt;
same as the Ruby &lt;code&gt;do&lt;/code&gt; blocks? Example with Vagrant Ruby configuration &lt;br&gt;
file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Vagrant.configure(&amp;quot;2&amp;quot;) do |config|
  &lt;a href="http://config.vm.box" rel="nofollow" target="_blank"&gt;config.vm.box&lt;/a&gt; = &amp;quot;bento/ubuntu-24.04&amp;quot;
  &lt;a href="http://config.vm.box" rel="nofollow" target="_blank"&gt;config.vm.box&lt;/a&gt;_version = &amp;quot;202510.26.0&amp;quot;
end
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;It's not quite the same.  I don't have any Ruby experience, so going based on &lt;a href="https://zetcode.com/ruby/do-keyword/" rel="nofollow" target="_blank"&gt;https://zetcode.com/ruby/do-keyword/&lt;/a&gt;, it can be used in a similar way but it's not the same mechanism.  Ruby (per that page) creates a closure for a do block, and thus variables go out of scope at the end and get closed implicitly.  A using block in this RFC creates no closure or scope.  The body of the using expression executes in the same function context as the code around it.  Also, the context manager generator itself allows more cleanup than just &amp;quot;unset()&amp;quot; on the context variable.  That happens automatically, which can trigger some cleanup, but the context manager is able to do a lot more if it wants to.&lt;/p&gt;
&lt;p&gt;The model we are building from is Python, basically.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When you set the example as:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;using (file_for_write('file.txt') =&amp;gt; $fp) {
    foreach ($someThing as $value) {
        fwrite($fp, serialize($value));
    }
};
// At this point, we're guaranteed that $fp has closed, whether there 
was an error or not.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It means that the block inside &lt;code&gt;using&lt;/code&gt; is aware of variables outside of &lt;br&gt;
it's own scope, right?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Correct.  There is no &amp;quot;own scope&amp;quot;.  As implemented currently, it's just materializing some generator read logic around the body of the using block.  There is no new function scope created, so the code inside is &amp;quot;in&amp;quot; the function it's already in, as it always has been.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I like the idea. I have to admit that at first I was confused because I &lt;br&gt;
thought that the first example in the RFC post was exactly the same as &lt;br&gt;
the second example (Error catching included).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You mean in the introduction?  They do accomplish the same goal, just with less code in the context manager version.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I have another question: according to PHP documentation (&amp;quot;Freeing &lt;br&gt;
resources&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.php.net/manual/en/language.types.resource.php#:~:text=makes%20no%20sense.-,Freeing%20resources,-%C2%B6" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/language.types.resource.php#:~:text=makes%20no%20sense.-,Freeing%20resources,-%C2%B6&lt;/a&gt;):&lt;/p&gt;
&lt;p&gt;&amp;quot;Thanks to the reference-counting system being part of the Zend Engine, &lt;br&gt;
a resource with no more references to it is detected automatically, and &lt;br&gt;
it is freed by the garbage collector. For this reason, it is rarely &lt;br&gt;
necessary to free the memory manually.&amp;quot;&lt;/p&gt;
&lt;p&gt;From what I understand by this text, &lt;code&gt;fclose()&lt;/code&gt; is optional (but &lt;br&gt;
recommended according to some Stack Overflow posts). In both cases &lt;br&gt;
(using or not the using &lt;code&gt;using&lt;/code&gt;), this acts exactly the same. The only &lt;br&gt;
difference is that you declare the variable inside the using instead of &lt;br&gt;
the outside the try/catch block, right? Because even inside the &lt;code&gt;using&lt;/code&gt; &lt;br&gt;
function you would need to invoke the &lt;code&gt;fclose()&lt;/code&gt; function, right?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;PHP will automatically close() a resource that goes out of scope, just as it will garbage collect an object that goes out of scope.  However, that is only true if that is the last reference to that resource/object.  If the value had &amp;quot;escaped&amp;quot; (see the section in the RFC), then the file wouldn't be closed at that point.  Also, even if PHP will cleanup as it goes, it's still good practice to close a file when you're done with it to minimize race conditions.  A using block takes care of both of those for you.  The context manager generator function is where the &lt;code&gt;fclose()&lt;/code&gt; would live, so you don't have to remember to write it yourself every time.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Apart from easing the expressiveness of the language, I'm curious of &lt;br&gt;
what would be other benefits. In the post you express that it provides &lt;br&gt;
&amp;quot;a way to abstract out common control-flow and &lt;br&gt;
variable-lifetime-management pattern&amp;quot;. What are the ways this function &lt;br&gt;
may bring such improvements? Are those improvement observed by language &lt;br&gt;
like Python not already available in PHP by default? I read somewhere &lt;br&gt;
that PHP tends to be more memory efficient than Python due to the &lt;br&gt;
processing of the many magic methods and other issues. If so, Is the &lt;br&gt;
context manager in Python focused on improving the &lt;br&gt;
variable-lifetime-management due to Python internal issues, and are &lt;br&gt;
these issues present in PHP?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The examples section includes most of the example cases I could think of off hand, but I'm sure there are more.  Basically, any time you have the use case of &amp;quot;I want to stick some setup logic at the start of this code, and some cleanup and error handling logic at the end&amp;quot;, a context manager can abstract that away for you, resulting in reusable logic and in your business logic not getting confused with the boilerplate error handling.&lt;/p&gt;
&lt;p&gt;Think of opening a connection to some remote service and sending a message to it, but then there's like 10 error cases you need to handle.  That's a great example to factor out into a using block, so you don't need to do all that error handling each time.&lt;/p&gt;
&lt;p&gt;For use in Python, I recommend this video, which lays out a &amp;quot;Pythonic&amp;quot; way of thinking, and in particular shows how context managers in Python can help vastly simplify code.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=wf-BqAjZb8M" rel="nofollow" target="_blank"&gt;https://www.youtube.com/watch?v=wf-BqAjZb8M&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(That's the video that really helped me wrap my head around context managers and made me want them in PHP.)&lt;/p&gt;
&lt;p&gt;As far as performance, there's a huge number of differences between PHP and Python that impact performance.  The engine itself is less efficient, plus yes, Python relies a lot more heavily on magic callbacks that incur extra overhead (just as they do in PHP).  You can't really pin it down to any one thing.  Context Managers in Python in particular are mainly about managing flow of control and error handling, not performance, which is the same for this RFC.&lt;/p&gt;
&lt;p&gt;The way using is implemented here, that impact is minimal.  It adds a generator invocation and read, and that's about it.  So it's not 100% free, but the overhead is minimal, and comparable to if you were passing a closure to some ordinary function that did the same sort of wrapping.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>39e9a022-6467-4044-bbf9-dcfb78a5f838@app.fastmail.com</guid><pubDate>Fri, 06 Nov 2026 14:49:37 +0000</pubDate></item><item><title>[RFC] Prepared Literal String Matching and Replacement</title><link>https://externals.io/message/133028</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I'd like to open discussion on this RFC: &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/prepared_literal_string_matching" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/prepared_literal_string_matching&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It proposes Str\Matcher and Str\Replacer for prepared literal substring &lt;br&gt;
search and replacement. Matcher provides presence checks, unique matched &lt;br&gt;
keywords, occurrence counts, and enumeration of all overlapping matches &lt;br&gt;
with byte offsets, using Str\MatchResult objects. Replacer performs &lt;br&gt;
non-overlapping replacements, choosing the earliest start and then the &lt;br&gt;
longest key, without rescanning inserted text.&lt;/p&gt;
&lt;p&gt;Both classes prepare an immutable dictionary during construction. &lt;br&gt;
Matching is byte-oriented, binary-safe, and case-sensitive. Objects can be &lt;br&gt;
reused within a request or in long-running applications.&lt;/p&gt;
&lt;p&gt;I've implemented the API and published reproducible benchmarks covering &lt;br&gt;
both prepared calls and one-shot use, including construction and &lt;br&gt;
destruction. &lt;br&gt;
Preparation can pay off even for a single call on some inputs. On others, &lt;br&gt;
existing PHP functions or PCRE remain faster, even than a prepared object.&lt;/p&gt;
&lt;p&gt;I propose including these classes in ext/standard in the Str namespace. &lt;br&gt;
The current implementation is in ext/strmatch. I'd welcome feedback on &lt;br&gt;
the API, integration, error types, and whether Matcher and Replacer &lt;br&gt;
should be considered together or separately.&lt;/p&gt;
&lt;p&gt;Implementation: &lt;br&gt;
&lt;a href="https://github.com/php/php-src/pull/25122" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/25122&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Benchmarks, methodology and raw data: &lt;br&gt;
&lt;a href="https://github.com/ArtUkrainskiy/php-src-bench/tree/main/reports/multi-pattern-search" rel="nofollow" target="_blank"&gt;https://github.com/ArtUkrainskiy/php-src-bench/tree/main/reports/multi-pattern-search&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Artem Ukrainskiy&lt;/p&gt;
</description><guid>CAPen=wEpZqJyaypHhh+rYe3k0XWbEeAmu2wFB_4Damq6XFnyoQ@mail.gmail.com</guid><pubDate>Fri, 06 Nov 2026 12:59:32 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133027</link><description>&lt;p&gt;Le 06/11/2026 à 12:19, Pierre a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I love the simplicity for this RFC. I have one question: what happens &lt;br&gt;
if the generator yield more than once, will the using block run more &lt;br&gt;
than once ? If so it seems odd and may trigger very hard to debug &lt;br&gt;
problems (I can imagine some SQL transaction running more than once &lt;br&gt;
because of a generator bug).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The implementation details section gave me an answer, the generator can &lt;br&gt;
only yield once.&lt;/p&gt;
&lt;p&gt;Sorry for the noise.&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;Pierre&lt;/p&gt;
</description><guid>39019bdd-0310-45aa-8307-8adf71b0977f@processus.org</guid><pubDate>Fri, 06 Nov 2026 12:31:09 +0000</pubDate></item><item><title>[RFC] Io\Terminal</title><link>https://externals.io/message/133026</link><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I've updated the Io\Terminal RFC to version 0.5:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/io_terminal" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/io_terminal&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It adds examples for raw-mode leases and sequential reads, clarifies &lt;br&gt;
lease restoration, escape-sequence timeouts, resize notifications, and &lt;br&gt;
line endings, and marks enableRawMode() as NoDiscard.&lt;/p&gt;
&lt;p&gt;The PR has been updated to match, and its CI checks are green:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/php/php-src/pull/23941" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/23941&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As mentioned earlier, I'm holding off on voting while the discussion continues.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Pratik&lt;/p&gt;
&lt;p&gt;On Fri, 06 Nov 2026 02:43:52 -0800, Pratik Bhujel &lt;br&gt;
&lt;a href="mailto:prateekbhujelpb@gmail.com"&gt;prateekbhujelpb@gmail.com&lt;/a&gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Tim and Frode,&lt;/p&gt;
&lt;p&gt;Thanks for the review, and Frode, thanks for trying the PR in phasync/tui. I’m holding off on opening the vote on November 12.&lt;/p&gt;
&lt;p&gt;Tim, your lease examples match the behavior. The last release restores the saved terminal attributes on POSIX or the saved input mode on Windows. If the terminal was already raw, that’s the state it restores, even if it was changed while the lease was active. Dropping the last reference attempts to release the lease. If explicit restoration fails, restoreMode() throws and leaves the token active so the caller can retry. I’ve documented the destruction behavior in the stub and added NoDiscard to enableRawMode().&lt;/p&gt;
&lt;p&gt;A longer sequence timeout is valid: the wait is capped at the remaining overall time. &lt;code&gt;readLine()&lt;/code&gt; returns the submitted value without the Enter delimiter, like readSecret(), while preserving other whitespace. I’d keep Key::Resize for now as a notification to query the size.&lt;/p&gt;
&lt;p&gt;Frode, it’s helpful to see raw mode and size used on their own. I’m keeping the reads in this revision for small CLI tools that need portable key and hidden input. On a native Windows console, readKey() reads console records. The raw-mode lease leaves the existing VT settings alone, and Ctrl+C is available as input. I agree that a richer decoder for modifiers, mouse and paste deserves its own design.&lt;/p&gt;
&lt;p&gt;fromStreams(STDIN, STDOUT) covers the usual CLI case. fromStdio() resolves the current native standard handles at operation time; fromStreams() keeps the resources passed in.&lt;/p&gt;
&lt;p&gt;The patch is up at &lt;a href="https://github.com/php/php-src/pull/23941" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/23941&lt;/a&gt;. I’ve prepared examples for the leases and sequential reads, and verified them with a Linux PTY and a scripted stream. I’ll announce the RFC revision here once it’s published, before proposing a new voting date.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Pratik&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi all, I plan to open voting on the Io\Terminal RFC on Thursday, November 12. &lt;a href="https://wiki.php.net/rfc/io_terminal"&gt;https://wiki.php.net/rfc/io_terminal&lt;/a&gt; If you have any remaining concerns, please let me know before then. Regards, Pratik&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
</description><guid>CA+9BsNeAp=gn3DW58RDLwWL92a=O-9d-MUbT1=fwiPrRm+0uBg@mail.gmail.com</guid><pubDate>Fri, 06 Nov 2026 11:49:26 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133025</link><description>&lt;p&gt;Le 05/11/2026 à 18:33, Larry Garfield a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It basically swaps the two-method approach in favor of &amp;quot;it's a generator, you're welcome.&amp;quot;  The result is, I think, both simpler and more flexible, and resolves a number of other issues as well.  More details in the RFC.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I love the simplicity for this RFC. I have one question: what happens if &lt;br&gt;
the generator yield more than once, will the using block run more than &lt;br&gt;
once ? If so it seems odd and may trigger very hard to debug problems (I &lt;br&gt;
can imagine some SQL transaction running more than once because of a &lt;br&gt;
generator bug).&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;Pierre&lt;/p&gt;
</description><guid>85cf4037-e8d7-421d-b151-a54e0ca29f22@processus.org</guid><pubDate>Fri, 06 Nov 2026 11:19:36 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133024</link><description>&lt;p&gt;Am 05.11.2026, 18:33:14 schrieb Larry Garfield &lt;a href="mailto:larry@garfieldtech.com"&gt;larry@garfieldtech.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi folks.  Based on the feedback and problems with the previous Context &lt;br&gt;
Managers RFC, Arnaud and I have a new approach to present:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/context-managers-v2" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/context-managers-v2&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;trying to understand, can you implement the file_for_write method in the &lt;br&gt;
code sample to its more clear how that creates a generator?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It basically swaps the two-method approach in favor of &amp;quot;it's a generator, &lt;br&gt;
you're welcome.&amp;quot;  The result is, I think, both simpler and more flexible, &lt;br&gt;
and resolves a number of other issues as well.  More details in the RFC.&lt;/p&gt;
&lt;p&gt;There is a linked implementation, though Arnaud warns it's only partially &lt;br&gt;
complete so go easy on it. :-)  But the design in the RFC is all ready for &lt;br&gt;
review.&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
Larry Garfield &lt;br&gt;
&lt;a href="mailto:larry@garfieldtech.com" rel="nofollow" target="_blank"&gt;larry@garfieldtech.com&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>CAEPJdumj65ixBERnGx86pFTNLU0UzRG-GDB0Q3229oMRXkkPfA@mail.gmail.com</guid><pubDate>Fri, 06 Nov 2026 11:12:12 +0000</pubDate></item><item><title>[RFC] Io\Terminal</title><link>https://externals.io/message/133023</link><description>&lt;p&gt;Hi Tim and Frode,&lt;/p&gt;
&lt;p&gt;Thanks for the review, and Frode, thanks for trying the PR in phasync/tui. &lt;br&gt;
I’m holding off on opening the vote on November 12.&lt;/p&gt;
&lt;p&gt;Tim, your lease examples match the behavior. The last release restores the &lt;br&gt;
saved terminal attributes on POSIX or the saved input mode on Windows. If &lt;br&gt;
the terminal was already raw, that’s the state it restores, even if it was &lt;br&gt;
changed while the lease was active. Dropping the last reference attempts to &lt;br&gt;
release the lease. If explicit restoration fails, restoreMode() throws and &lt;br&gt;
leaves the token active so the caller can retry. I’ve documented the &lt;br&gt;
destruction behavior in the stub and added NoDiscard to enableRawMode().&lt;/p&gt;
&lt;p&gt;A longer sequence timeout is valid: the wait is capped at the remaining &lt;br&gt;
overall time. &lt;code&gt;readLine()&lt;/code&gt; returns the submitted value without the Enter &lt;br&gt;
delimiter, like readSecret(), while preserving other whitespace. I’d keep &lt;br&gt;
Key::Resize for now as a notification to query the size.&lt;/p&gt;
&lt;p&gt;Frode, it’s helpful to see raw mode and size used on their own. I’m keeping &lt;br&gt;
the reads in this revision for small CLI tools that need portable key and &lt;br&gt;
hidden input. On a native Windows console, readKey() reads console records. &lt;br&gt;
The raw-mode lease leaves the existing VT settings alone, and Ctrl+C is &lt;br&gt;
available as input. I agree that a richer decoder for modifiers, mouse and &lt;br&gt;
paste deserves its own design.&lt;/p&gt;
&lt;p&gt;fromStreams(STDIN, STDOUT) covers the usual CLI case. fromStdio() resolves &lt;br&gt;
the current native standard handles at operation time; fromStreams() keeps &lt;br&gt;
the resources passed in.&lt;/p&gt;
&lt;p&gt;The patch is up at &lt;a href="https://github.com/php/php-src/pull/23941" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/23941&lt;/a&gt;. I’ve prepared &lt;br&gt;
examples for the leases and sequential reads, and verified them with a &lt;br&gt;
Linux PTY and a scripted stream. I’ll announce the RFC revision here once &lt;br&gt;
it’s published, before proposing a new voting date.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Pratik&lt;/p&gt;
&lt;p&gt;On Fri, 06 Nov 2026 09:21:48 +0000, Pratik Bhujel &lt;a href="mailto:prateekbhujelpb@gmail.com"&gt;prateekbhujelpb@gmail.com&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;p&gt;Hi all, I plan to open voting on the Io\Terminal RFC on Thursday, November &lt;br&gt;
12. &lt;a href="https://wiki.php.net/rfc/io_terminal"&gt;https://wiki.php.net/rfc/io_terminal&lt;/a&gt; If you have any remaining &lt;br&gt;
concerns, please let me know before then. Regards, Pratik&lt;/p&gt;
</description><guid>CA+9BsNcbazKHi=XvnUF9U=ZJj-eZfi68vzbYTKRRhYZ82mWjuA@mail.gmail.com</guid><pubDate>Fri, 06 Nov 2026 10:43:52 +0000</pubDate></item><item><title>[RFC] Io\Terminal</title><link>https://externals.io/message/133022</link><description>&lt;p&gt;Hi Pratik, hi internals,&lt;/p&gt;
&lt;p&gt;I maintain phasync/tui, a terminal UI library for PHP (layouts, widgets, and a VT emulator so shells and full-screen programs run in panes). I built php-src#23941 and switched tui's terminal handling to Io\Terminal where it exists:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/phasync/tui/commit/eb7f919" rel="nofollow" target="_blank"&gt;https://github.com/phasync/tui/commit/eb7f919&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Raw mode is now a ModeToken lease and the size comes from getSize(), instead of four stty runs (stty -g, stty raw -echo, stty &amp;lt;saved&amp;gt;, stty size). tui's test suite gives the same results on the PR build as on stock PHP, including the tests that crash a program in a pty in various ways and check with stty -a that the terminal was restored. That part of the RFC works, and it is exactly what userland cannot do without spawning stty, using FFI, or Windows-specific tricks. Thank you for it.&lt;/p&gt;
&lt;p&gt;I would like to suggest that the RFC proceeds with a reduced scope: the operations userland now shells out for, and nothing that userland already does well.&lt;/p&gt;
&lt;p&gt;What userland needs from core today:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Saving the mode, entering raw mode, restoring it: Laravel Prompts runs stty -g and stty &amp;lt;mode&amp;gt; (src/Terminal.php), Symfony Console runs stty in Terminal and in QuestionHelper for hidden input, tui ran stty -g / raw -echo / restore.&lt;/li&gt;
&lt;li&gt;The size: Symfony Console uses stty -a and mode CON, tui used stty size.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;enableRawMode()/restoreMode(), getSize(), TerminalSize, ModeToken and TerminalException cover all of these, on POSIX and Windows.&lt;/p&gt;
&lt;p&gt;What userland already does well, so it need not be in core:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Key decoding. php-tui/term has a 600-line EventParser with modifiers, mouse and focus events; Laravel Prompts keeps its own key table, modified arrows included; tui's InputDecoder reads legacy xterm keys with modifiers, the kitty keyboard protocol, modifyOtherKeys, SGR and X10 mouse, bracketed paste and focus reports. readKey() returns Key|string|null with 28 keys and no modifiers, so none of these libraries could switch to it, and the enum cannot gain modifiers later without a new method beside it.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;readLine()&lt;/code&gt; overlaps with &lt;code&gt;fgets()&lt;/code&gt;; readSecret() is policy (Escape, Ctrl+C and Ctrl+D cancel, Backspace edits, no masking) that is a few lines in userland once raw mode exists, and that prompt libraries will want to decide for themselves.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If key input is wanted in core later, I think a separate RFC could do it as a pure decoder (bytes in, events out, plus a flush for a lone Escape), with an event object that has room for modifiers, mouse and paste. It would serve blocking scripts and event loops alike, and avoid decoder state that belongs to one Terminal instance.&lt;/p&gt;
&lt;p&gt;Smaller points on the reduced scope:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Factories: fromStreams() is enough. It already covers STDIN/STDOUT, a pty, and /dev/tty (CONIN$/CONOUT$) when stdio is redirected, which is common for prompts in piped scripts. fromStdio() re-resolves the standard handles on each call; is there a use case that fromStreams(STDIN, STDOUT) does not cover? If not, one factory is easier to explain.&lt;/li&gt;
&lt;li&gt;Raw mode on Windows: libraries that read and write escape sequences need virtual terminal input (ENABLE_VIRTUAL_TERMINAL_INPUT) and output processing. The RFC leaves the console flags to the implementation. Could raw mode specify them, or take an option for them?&lt;/li&gt;
&lt;li&gt;Ctrl+C: some programs want raw input but Ctrl+C still delivered as a signal. An optional argument to enableRawMode() would allow that now or in a later version without breaking anything.&lt;/li&gt;
&lt;li&gt;Resize: with readKey() out, Key::Resize goes too. On POSIX a cheap getSize() plus &lt;code&gt;SIGWINCH&lt;/code&gt; is enough; on Windows the console reports resizes as input records, which a later input RFC could cover.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I would support Io\Terminal in that form, and I am happy to test further revisions with tui.&lt;/p&gt;
</description><guid>AS8PR08MB73395D0406480CD126304569D9762@AS8PR08MB7339.eurprd08.prod.outlook.com</guid><pubDate>Fri, 06 Nov 2026 10:15:17 +0000</pubDate></item><item><title>[RFC] Io\Terminal</title><link>https://externals.io/message/133021</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I would like to formally propose the Io\Terminal API for PHP 8.7:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/io_terminal" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/io_terminal&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Pulling my reply to the top-level to reduce thread nesting. My apologies &lt;br&gt;
for only getting back to the RFC now, the last few weeks have been busy. &lt;br&gt;
I have just given the RFC another full read and have some more comments, &lt;br&gt;
particularly around the “mode lease handling”, which is the by far most &lt;br&gt;
complicated part of the RFC and where I feel that some extra explanation &lt;br&gt;
and examples could help folks understand the behavior better than the &lt;br&gt;
(extremely information dense) prose that the RFC currently contains.&lt;/p&gt;
&lt;p&gt;Specifically:&lt;/p&gt;
&lt;p&gt;(1) My understanding is that dropping the &lt;code&gt;ModeToken&lt;/code&gt; is equivalent to &lt;br&gt;
passing it to &lt;code&gt;restoreMode()&lt;/code&gt;. I think it would make sense to make this &lt;br&gt;
“destruction behavior” explicit by adding a &lt;code&gt;ModeToken::__destruct()&lt;/code&gt; &lt;br&gt;
function to the stub, even if the internal implementation does not &lt;br&gt;
actually implement &lt;code&gt;__destruct()&lt;/code&gt;. Seeing the &lt;code&gt;__destruct()&lt;/code&gt; in the stub &lt;br&gt;
is a good visual indicator that the class has “special behavior” on &lt;br&gt;
destruction that goes beyond the usual “all associated resources are &lt;br&gt;
freed or closed”. The restoration is not just freeing or closing, it's &lt;br&gt;
actual behavior.&lt;/p&gt;
&lt;p&gt;(2) An explicit example where multiple &lt;code&gt;ModeToken&lt;/code&gt; leases are obtained &lt;br&gt;
with explicit comments what happens at each step would go great lengths &lt;br&gt;
of making the behavior approachable. From my understanding this would be &lt;br&gt;
a correct example?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; &amp;amp;lt;?php

 $terminal = Terminal::fromStdio();

 $lease1 = $terminal-&amp;gt;enableRawMode(); // Terminal is in raw mode 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;now. &lt;br&gt;
$lease2 = $terminal-&amp;gt;enableRawMode(); // No change to the terminal &lt;br&gt;
mode. 2 leases active. &lt;br&gt;
$lease3 = $terminal-&amp;gt;enableRawMode(); // No change to the terminal &lt;br&gt;
mode. 3 leases active.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; assert($lease1 !== $lease2); // The lease objects are separate, 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;there is no singleton cache.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; // Leases can be released in any order.

 unset($lease2); // No change to the terminal mode. 2 leases active.

 $terminal-&amp;gt;restoreMode($lease1); // No change to the terminal mode. 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;1 lease active.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; $terminal-&amp;gt;restoreMode($lease3); // Terminal goes back to normal.

 (void)$terminal-&amp;gt;enableRawMode(); // Terminal is in raw mode and 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;immediately goes back to normal, because the returned token is &lt;br&gt;
immediately destroyed.&lt;/p&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; &amp;amp;lt;?php

 $terminal = Terminal::fromStdio();

 $lease1 = $terminal-&amp;gt;enableRawMode(); // Terminal is in raw mode 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;now.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; unset($terminal); // Terminal object is destroyed, but the actual 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;terminal remains in raw mode.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; $terminal = Terminal::fromStdio(); // This Terminal object starts 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;off in raw mode!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; unset($lease1); // The terminal goes back to normal.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Perhaps there are more interactions that would be worth showing as an &lt;br&gt;
example.&lt;/p&gt;
&lt;p&gt;(3) Given the &lt;code&gt;(void)$terminal-&amp;gt;enableRawMode()&lt;/code&gt; call in the first &lt;br&gt;
example, I believe that &lt;code&gt;Terminal::enableRawMode()&lt;/code&gt; should be &lt;br&gt;
&lt;code&gt;#[\NoDiscard]&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;(4) The RFC mentions “Final restoration restores the saved snapshot, &lt;br&gt;
rather than merging changes made externally while leases were active.”. &lt;br&gt;
It should be clear what is being restored. Is it just the terminal mode &lt;br&gt;
(raw or not)? What happens if the terminal was already in raw mode (e.g. &lt;br&gt;
using a &lt;code&gt;stty&lt;/code&gt; call) when &lt;code&gt;enableRawMode()&lt;/code&gt; is called? Will &lt;br&gt;
&lt;code&gt;enableRawMode()&lt;/code&gt; be a no-op and will returning the lease put the &lt;br&gt;
terminal back into raw mode when another &lt;code&gt;stty&lt;/code&gt; call already put it in &lt;br&gt;
normal mode? Or will it return a no-op lease?&lt;/p&gt;
&lt;p&gt;(5) In the “Reading keys” section, the RFC says “The sequence wait &lt;br&gt;
cannot extend the overall timeout.”. Will this be a ValueError, or will &lt;br&gt;
it silently be clamped?&lt;/p&gt;
&lt;p&gt;(6) For reading lines: I think the removal of the line terminator is &lt;br&gt;
inconsistent with every existing API. I don't necessarily disagree with &lt;br&gt;
the proposed behavior, but the RFC should properly justify the &lt;br&gt;
difference. This is also important for the documentation.&lt;/p&gt;
&lt;p&gt;(7) The “Input state and sequential reads” section could also do with &lt;br&gt;
examples.&lt;/p&gt;
&lt;p&gt;(8) I'm not sure if  &lt;code&gt;Key::Resize&lt;/code&gt; is good design. Just to throw a &lt;br&gt;
suggestion in the ring: We could have two enums &lt;code&gt;Key&lt;/code&gt; and &lt;code&gt;Metadata&lt;/code&gt; (or &lt;br&gt;
similar), with &lt;code&gt;readKey()&lt;/code&gt; returning &lt;code&gt;Key|Metadata&lt;/code&gt;. No strong opinion &lt;br&gt;
on that, though.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Overall I'm pretty happy with the proposed API now. My main concern is &lt;br&gt;
the lack of examples which make the RFC very hard to approach and &lt;br&gt;
probably makes it hard for voters to make an educated decisions.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>0fe2d5fcd2938384acc2afa40097feaa@bastelstu.be</guid><pubDate>Fri, 06 Nov 2026 10:04:26 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133020</link><description></description><guid>c101c9d8-1e3f-467c-921e-fdeffe1b877c@email.android.com</guid><pubDate>Fri, 06 Nov 2026 09:40:52 +0000</pubDate></item><item><title>[RFC] [Discussion] Query Parameter Manipulation Support</title><link>https://externals.io/message/133019</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Some more bits that I found easy enough to reply to without giving the &lt;br&gt;
RFC another full read right now. I hope that my answer to (4) unblocks &lt;br&gt;
your work on the RFC. The other points that I didn't reply to, I'll do &lt;br&gt;
at another time. I'll let you know in the emails when I think I said &lt;br&gt;
something to everything that I think is worth replying to.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;I don't think &lt;code&gt;QueryParamParsingOptions::$maxQueryStringLength&lt;/code&gt; is&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;necessary or useful to have. Checking the input length is easy to do &lt;br&gt;
manually (it's just a &lt;code&gt;strlen()&lt;/code&gt; call) and I don't see a practical way &lt;br&gt;
to abuse the API with large input lengths alone: The API will not &lt;br&gt;
“blow &lt;br&gt;
up” inputs into considerably larger data structures, the input strings &lt;br&gt;
are mostly just “copied” over, not too different from e.g. &lt;br&gt;
&lt;code&gt;str_replace()&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;[…]&lt;/p&gt;
&lt;p&gt;So the real question is whether QueryParams really cannot be abused via &lt;br&gt;
long strings, and whether $maxParamCount alone could mitigate those &lt;br&gt;
risks?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Answered in &lt;a href="https://news-web.php.net/php.internals/133001" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/133001&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="4"&gt;
&lt;li&gt;For the &lt;code&gt;QueryParamBuildingOptions&lt;/code&gt; I don't think they should be&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;passed as parameter to the parsing functions (and thus not be stored &lt;br&gt;
as &lt;br&gt;
an object property). Instead they should be passed to the &lt;code&gt;-&amp;gt;to*()&lt;/code&gt; &lt;br&gt;
functions just when they are needed. That keeps the QueryParams class’ &lt;br&gt;
state focused on the actual parameters.&lt;/p&gt;
&lt;p&gt;Edit after getting further down the RFC: This choice is explained &lt;br&gt;
further below, because it immediately affects the getters. This makes &lt;br&gt;
sense, but I still believe this is a less than ideal API design. But I &lt;br&gt;
don't have better proposals other than “force the user to make a &lt;br&gt;
decision and only allow passing in &lt;code&gt;string&lt;/code&gt;”. For &lt;code&gt;int&lt;/code&gt; the implicit &lt;br&gt;
conversion to string would just work and making an explicit choice for &lt;br&gt;
&lt;code&gt;bool&lt;/code&gt; is easy enough.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, it was another inner debate for me whether relying on explicit &lt;br&gt;
casting &lt;br&gt;
to a string &lt;br&gt;
by the user or supporting automatic conversion is a better approach. I &lt;br&gt;
believe &lt;br&gt;
offering some kind of automatic casting approach is more ergonomic, so &lt;br&gt;
I &lt;br&gt;
think &lt;br&gt;
it's useful to try to keep this mechanism if possible.&lt;/p&gt;
&lt;p&gt;Moreover, the fromArray() method reads the input array recursively, &lt;br&gt;
which &lt;br&gt;
means &lt;br&gt;
that in the absence of building options, users would need to make sure &lt;br&gt;
that &lt;br&gt;
each &lt;br&gt;
parameter value is casted to a supported type, even the nested ones. &lt;br&gt;
For &lt;br&gt;
most legal cases, &lt;br&gt;
the conversion is trivial (int, float, backed enum), so why require an &lt;br&gt;
explicit conversion?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For more structured handling within a PHP program, I feel that nowadays &lt;br&gt;
the general sentiment is to “wrap it into a class”. In that class you &lt;br&gt;
could then easily add a method that returns an array with the desired &lt;br&gt;
representation, quite similar to &lt;code&gt;jsonSerializable()&lt;/code&gt;. Converting all &lt;br&gt;
boolean values to the same desired representation is also not &lt;br&gt;
particularly complicated with something like &lt;code&gt;array_map(iif(?, 'true',  'incorrect'), $array)&lt;/code&gt; where:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; function iif(bool $cond, mixed $if_true, mixed $if_false) {
     return $cond ? $if_true : $if_false;
 }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you know I'm a big fan of functionality that composes well, where &lt;br&gt;
each individual feature does just one job - and does it well. And I &lt;br&gt;
think with partial function application doing the mapping yourself can &lt;br&gt;
be done fairly succinctly and does not require reimplementing the logic &lt;br&gt;
for the query parameter implementation (which would also require &lt;br&gt;
documentation and users to learn about this).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[…] &lt;br&gt;
As a result, I'm fine with changing the input param type for append() &lt;br&gt;
and &lt;br&gt;
set(): &lt;br&gt;
instead of &amp;quot;mixed&amp;quot;, maybe we could accept &lt;br&gt;
&amp;quot;string|int|float|BackedEnum|null&amp;quot;? I still &lt;br&gt;
think that using a &amp;quot;?string&amp;quot; type would be too pedantic. Going with the &lt;br&gt;
above signature &lt;br&gt;
would mean that one would need to cast a bool input to any of the &lt;br&gt;
supported &lt;br&gt;
ones (or &lt;br&gt;
omit them e.g. in case of false, as seen in the example above), and &lt;br&gt;
they &lt;br&gt;
would also need &lt;br&gt;
to handle null values on a case by case basis, since passing a null &lt;br&gt;
value &lt;br&gt;
would always &lt;br&gt;
add the parameter without a value (in line with &lt;br&gt;
QueryParamNullPolicy::KeyOnly), &lt;br&gt;
and the behavior of QueryParamNullPolicy::SkipTuple could be emulated &lt;br&gt;
by &lt;br&gt;
simply skipping &lt;br&gt;
calling append() or set() on the input. I don't know if it makes sense &lt;br&gt;
to &lt;br&gt;
you, &lt;br&gt;
but that's the idea which currently sounds the best for me.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, that proposal sounds reasonable from giving it a quick thought. In &lt;br&gt;
fact for boolean values the proposed signature is preferable to &lt;br&gt;
&lt;code&gt;string|null&lt;/code&gt;, because &lt;code&gt;string|null&lt;/code&gt; makes &lt;code&gt;false&lt;/code&gt; become the empty &lt;br&gt;
string, and including &lt;code&gt;int&lt;/code&gt; makes false become &lt;code&gt;0&lt;/code&gt;. I have some small &lt;br&gt;
concerns about &lt;code&gt;float&lt;/code&gt; due to precision errors, but that should probably &lt;br&gt;
be fine if we use the &lt;code&gt;serialize_precision&lt;/code&gt;, since that would be &lt;br&gt;
consistent with the rest of PHP. Including the &lt;code&gt;BackedEnum&lt;/code&gt; there makes &lt;br&gt;
sense to me for folks that like &lt;code&gt;BackedEnum&lt;/code&gt;. And for &lt;code&gt;UnitEnum&lt;/code&gt;, a &lt;br&gt;
custom mapper is easy enough.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;However, I'm still unsure in case of fromArray() what would be the &lt;br&gt;
correct &lt;br&gt;
solution that is &lt;br&gt;
also as ergonomic as possible.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;See above, I think. This can easily be done with a combination of &lt;br&gt;
&lt;code&gt;array_map()&lt;/code&gt; / &lt;code&gt;array_filter()&lt;/code&gt; combined with PFA. The nice thing is that &lt;br&gt;
the API will land 8.7 at the earliest, so users already had a year to &lt;br&gt;
get used to PFA :-)&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;ol start="9"&gt;
&lt;li&gt;I'm not sure I like the name &lt;code&gt;-&amp;gt;list()&lt;/code&gt;. Technically it's also &lt;br&gt;
redundant with &lt;code&gt;iterator_to_array($queryParams)&lt;/code&gt;, but having a &lt;br&gt;
dedicated &lt;br&gt;
method probably makes sense nevertheless.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, I'm fine with renaming this method to toList(). It would go well &lt;br&gt;
with &lt;br&gt;
toArray() &lt;br&gt;
IMO. It's more ergonomic and more efficient than the alternative, so I &lt;br&gt;
agree &lt;br&gt;
that it's useful.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;code&gt;toList()&lt;/code&gt; makes sense to me. Folks will likely consider the &lt;br&gt;
tuple-format for each entry a little weird, but that should be easy &lt;br&gt;
enough to explain. And the distinction to &lt;code&gt;toArray()&lt;/code&gt; returning a nested &lt;br&gt;
array is clear enough.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>c923d6290a9363941fe26281c0c83f5c@bastelstu.be</guid><pubDate>Fri, 06 Nov 2026 09:22:37 +0000</pubDate></item><item><title>[RFC] Io\Terminal</title><link>https://externals.io/message/133018</link><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I plan to open voting on the Io\Terminal RFC on Thursday, November 12.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/io_terminal" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/io_terminal&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you have any remaining concerns, please let me know before then.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Pratik&lt;/p&gt;
</description><guid>CA+9BsNceX1zaPtRK=DF38XdZj2Brrw_w3SmYgTrGrz7t2_rL+Q@mail.gmail.com</guid><pubDate>Fri, 06 Nov 2026 09:21:48 +0000</pubDate></item><item><title>[RFC] Sunset PECL</title><link>https://externals.io/message/133017</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I'd like to introduce an RFC to lay out a timeline to sunset PECL and &lt;br&gt;
open it for discussion.&lt;/p&gt;
&lt;p&gt;RFC text is at &lt;a href="https://wiki.php.net/rfc/sunset_pecl" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/sunset_pecl&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thank you. With Docker, arguably the main remaining user of manually &lt;br&gt;
installing third party extensions, removing PECL from the images for PHP &lt;br&gt;
8.6 and having a well-functioning PIE workflow this makes sense to me. &lt;br&gt;
The proposed timeline also nicely coincides with the EOL of PHP 8.5, so &lt;br&gt;
that there should not be any remaining Docker users that we would break. &lt;br&gt;
It might make sense to add &lt;br&gt;
&lt;a href="https://github.com/docker-library/php/pull/1654" rel="nofollow" target="_blank"&gt;https://github.com/docker-library/php/pull/1654&lt;/a&gt; as a Reference to the &lt;br&gt;
RFC and to spell out explicitly why this timeline works out nicely.&lt;/p&gt;
&lt;p&gt;I have no other comments to the RFC.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>11975300570476a4aa4a33e98293b7eb@bastelstu.be</guid><pubDate>Fri, 06 Nov 2026 08:39:08 +0000</pubDate></item><item><title>[RFC] Time\Instant and Time\Clock</title><link>https://externals.io/message/133016</link><description>&lt;p&gt;Hi Tim,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On 29.10.2026 14:39 CET Tim Düsterhus &lt;a href="mailto:tim@bastelstu.be"&gt;tim@bastelstu.be&lt;/a&gt; wrote:&lt;/p&gt;
&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Due to the security releases it's been a while since I last looked into &lt;br&gt;
this RFC and I probably lost some of my working memory. Please indicate &lt;br&gt;
if there is something obvious that I missed somewhere or similar.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Clock resolution&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;[...]&lt;/p&gt;
&lt;p&gt;… but we can see how exposing the (nominal) resolution of specifically &lt;br&gt;
the SystemClock can be useful. I assume that a &lt;br&gt;
&lt;code&gt;SystemClock::getNominalResolution(): Duration&lt;/code&gt; with the &lt;code&gt;Duration&lt;/code&gt; &lt;br&gt;
being the greatest common divisor of possible returned values is what &lt;br&gt;
you would expect? [...]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, that’s exactly what I would expect. Thanks for adding it to the future scope.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;ol start="5"&gt;
&lt;li&gt;Taking a Unix timestamp directly from a clock&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Unix timestamps are used everywhere, not only in PHP, so &amp;quot;current time &lt;br&gt;
as a Unix timestamp&amp;quot; is a very common operation. Today that's &lt;code&gt;time()&lt;/code&gt;, &lt;br&gt;
which can't be mocked. With this RFC the mockable replacement is &lt;br&gt;
$clock-&amp;gt;now()-&amp;gt;getUnixTimestamp(), which always goes through an Instant &lt;br&gt;
object. I'd like a way to take the Unix timestamp directly from the &lt;br&gt;
clock.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Our goal with this RFC series is to provide a well-designed and &lt;br&gt;
well-typed new API that nudges the user to do the right thing. Making &lt;br&gt;
“raw integers” a first class citizen would go against that goal to save &lt;br&gt;
7 characters (and one object creation). The previous arguments against &lt;br&gt;
adding a &lt;code&gt;takeZonedDateTime()&lt;/code&gt; or similar also apply here.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This isn’t about saving characters. Software reads the current timestamp all the time and for many reasons, so that call should be as cheap as possible. With the proposed API, getting the Unix timestamp integer means creating an Instant object and making one more method call, only to get back the integer the system already returned in the first place.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;ol start="8"&gt;
&lt;li&gt;getUnixTimestamp() / getUnixTimestampMilliseconds()&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Only the milliseconds variant names its unit, and microseconds (used &lt;br&gt;
all &lt;br&gt;
over PHP: &lt;code&gt;microtime()&lt;/code&gt;, DateTime) and nanoseconds are missing entirely. &lt;br&gt;
A &lt;br&gt;
single pair taking the unit as an argument would cover all of them and &lt;br&gt;
stay symmetric:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The &lt;code&gt;toUnixTimestamp()&lt;/code&gt; + &lt;code&gt;getNanoseconds()&lt;/code&gt; pair is the canonical &lt;br&gt;
representation of a Unix timestamp - with “seconds” also being arguably &lt;br&gt;
by far the most common interpretation when hearing “Unix timestamp”. The &lt;br&gt;
“milliseconds” variant is provided for interoperability convenience, in &lt;br&gt;
particular with JavaScript.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I find it odd to give milliseconds a dedicated method just because one other language uses them as its main Unix timestamp resolution. And JavaScript doesn’t even use an integer there - it's a floating point. The result is an API that looks inconsistent: seconds and milliseconds are covered, microseconds and nanoseconds are not.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;PHP’s existing &lt;code&gt;DateTime&lt;/code&gt; does not provide functionality to obtain the &lt;br&gt;
timestamp as an integral number of microseconds, and &lt;code&gt;microtime()&lt;/code&gt; &lt;br&gt;
either returns a &lt;code&gt;float&lt;/code&gt; or a weird two-component pair as a string. I am &lt;br&gt;
not aware of anything commonly used that returns “integral microseconds &lt;br&gt;
since the Unix epoch”, do you know of anything?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Microseconds are the finest resolution in a lot of what PHP applications work with every day:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PHP itself: DateTime/DateTimeImmutable, &lt;code&gt;microtime()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;MySQL/MariaDB: DATETIME/TIMESTAMP with up to 6 fractional digits&lt;/li&gt;
&lt;li&gt;PostgreSQL: timestamp/timestamptz&lt;/li&gt;
&lt;li&gt;Apache Spark: TIMESTAMP&lt;/li&gt;
&lt;li&gt;Python: datetime/timedelta&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;public static function fromUnixTimestamp(int $timestamp, TimeUnit &lt;br&gt;
$unit = TimeUnit::Second): self; &lt;br&gt;
public function toUnixTimestamp(TimeUnit $unit = TimeUnit::Second): &lt;br&gt;
int;&lt;/p&gt;
&lt;p&gt;TimeUnit would be an enum of Second, Millisecond, Microsecond and &lt;br&gt;
Nanosecond, rounding towards negative infinity as already specified. &lt;br&gt;
The&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I do not find it obvious at all that “seconds” would be the largest &lt;br&gt;
supported unit of a &lt;code&gt;TimeUnit&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed, it isn’t really a time unit. What about something like FractionUnit or SecondUnit, so that the name makes clear it covers seconds and their fractions only?&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;ol start="10"&gt;
&lt;li&gt;Concepts the ISO-8601 pair brings into Instant&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;An Instant is described as a timezone-less point in time. The ISO-8601 &lt;br&gt;
constructor and getter bring in several concepts that Instant otherwise &lt;br&gt;
deliberately avoids:&lt;/p&gt;
&lt;p&gt;a) parsing and formatting of date-time strings; &lt;br&gt;
b) UTC as the reference (&amp;quot;Z&amp;quot; means a zero offset from UTC; since RFC &lt;br&gt;
9557 it formally means &amp;quot;UTC known, local offset unknown&amp;quot;); &lt;br&gt;
c) a calendar: ISO 8601 uses the proleptic Gregorian calendar with &lt;br&gt;
year &lt;br&gt;
0000; &lt;br&gt;
d) an opinionated input and output format&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes. I don't understand what you are getting at, though. There clearly &lt;br&gt;
has to be a way to represent a point in time in some way - and an &lt;br&gt;
ISO-8601 datetime string is one of the possible options, probably the &lt;br&gt;
most widely used one. The Unix timestamp is another one.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The RFC defines Instant as &amp;quot;an absolute point on the timeline of the universe&amp;quot;. It also says the timeline of the universe &amp;quot;does not know about days or months&amp;quot;. An ISO-8601 string is made of exactly those things: a calendar (years, months, days) and an offset from UTC. Both belong to the Earth, not to the timeline of the universe.&lt;/p&gt;
&lt;p&gt;The Unix timestamp is different in nature. It is the distance from one point in time to another. Any point on the timeline of the universe needs at least one reference point to be expressed.&lt;/p&gt;
&lt;p&gt;I see why the ISO-8601 representation is convenient, and I have never had to represent a time outside Earth myself. But is it really the right thing to do? At the very least, it conflicts with the definition of Instant.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;ol start="11"&gt;
&lt;li&gt;The accepted input grammar&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The RFC says the parser is strict but &amp;quot;may not support all legal &lt;br&gt;
formats&amp;quot;, &lt;br&gt;
and that accepted formats can be extended &amp;quot;by a simple pull request&amp;quot;. &lt;br&gt;
That &lt;br&gt;
means the vote doesn't decide the accepted grammar. Widening it later &lt;br&gt;
is &lt;br&gt;
also not BC-neutral for code that uses the parser as a validator. I'd &lt;br&gt;
like&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Since the RFC guarantees that only legal formats will be accepted, you &lt;br&gt;
are able to use it as a validator. If your use case requires narrower &lt;br&gt;
validation, then you will need to perform custom validation according to &lt;br&gt;
whatever specification you are dealing with. This is not unique to the &lt;br&gt;
Instant class.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My concern is the wording in the RFC: “It will only accept well-formed inputs, but may not support all legal formats” is very vague. It doesn’t say which legal formats are not supported, and I think that should be written out explicitly. ...&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;the RFC to specify the grammar explicitly and to state the outcome for &lt;br&gt;
the &lt;br&gt;
cases Ilia listed: comma decimal sign, lowercase t/z, space separator, &lt;br&gt;
-00:00, 24:00:00, 23:59:60, more than 9 fractional digits.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;See my reply to Ilia (&lt;a href="https://news-web.php.net/php.internals/132764" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/132764&lt;/a&gt;). &lt;br&gt;
The RFC changes are still open.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;... OK&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;A related point: &lt;br&gt;
the docblock requires &amp;quot;a zone offset&amp;quot; while the prose requires &amp;quot;a &lt;br&gt;
timezone&amp;quot;. Is an RFC 9557 suffix such as [Europe/Berlin] accepted, &lt;br&gt;
rejected or ignored?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks, I adjusted the prose to also require a “zone offset”.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="12"&gt;
&lt;li&gt;The output format&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The getter always emits Z, has a fractional part whose width depends on &lt;br&gt;
the value (omitted when zero, otherwise 9 digits), and uses signed &lt;br&gt;
expanded years outside 0000-9999.&lt;/p&gt;
&lt;p&gt;You mentioned that the getter implements the RFC 3339 subset of &lt;br&gt;
ISO-8601. &lt;br&gt;
That is not quite true: RFC 3339 only allows 4-digit years 0000-9999, &lt;br&gt;
so the output isn't RFC 3339 for expanded years.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That is a bit of a distinction without difference: RFC 3339 is only &lt;br&gt;
capable of representing years 0000 to 9999, so years outside of that &lt;br&gt;
range are by definition not representable as RFC 3339. The ISO-8601 &lt;br&gt;
getter specifically only switches to the expanded format outside that &lt;br&gt;
range. Adding a separate RFC 3339 getter that differs only by throwing &lt;br&gt;
an Exception for unrepresentable instants does not sound useful, since &lt;br&gt;
this Exception is not actionable in any way.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I did not ask for a separate RFC 3339 getter. I only wanted to point out that the output of toIso8601DateTimeString() does not conform to RFC 3339 in all cases - not more.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I also tested how well the possible outputs work as input for the &lt;br&gt;
existing &lt;br&gt;
DateTime API (PHP 8.5):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;new DateTimeImmutable($s) accepts all of them, but truncates the 9 &lt;br&gt;
fractional digits to 6 without notice.&lt;/li&gt;
&lt;li&gt;With createFromFormat() no single format string works. &lt;code&gt;DATE_ATOM&lt;/code&gt; &lt;br&gt;
only &lt;br&gt;
matches whole seconds with 4-digit years. DATE_RFC3339_EXTENDED &lt;br&gt;
(.v, &lt;br&gt;
3 digits) never matches. 'Y-m-d\TH:i:s.uP' fails on 9 digits &lt;br&gt;
because &lt;br&gt;
'u' takes at most 6, so you need a hack like 'Y-m-d\TH:i:s.u???P'. &lt;br&gt;
Expanded years need 'X' instead of 'Y'.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Because the fractional part is only present for some values, any strict &lt;br&gt;
consumer needs at least two format strings and has to choose between &lt;br&gt;
them, &lt;br&gt;
which is the trap Ilia described. An output that always includes the &lt;br&gt;
fractional part would at least make 'X-m-d\TH:i:s.u???P' work for every &lt;br&gt;
value.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I do not believe that the existing &lt;code&gt;DateTime&lt;/code&gt; API is a model of good &lt;br&gt;
design in that regard (and there are better ways for interoperability &lt;br&gt;
with it, as noted in &lt;a href="https://news-web.php.net/php.internals/132761" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/132761&lt;/a&gt;). &lt;br&gt;
Only taking a fixed format is already a problem as of now, because &lt;br&gt;
“conditionally omitting the fractional part” is common.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A lot of code depends on the existing DateTime API, so there should be a simple way to convert in both directions. The RFC already adds DateTimeInterface::toInstant(). Why not also add the reverse, e.g. DateTimeImmutable::createFromInstant() / DateTime::createFromInstant()?&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;ol start="13"&gt;
&lt;li&gt;A dedicated parser/formatter instead&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I'd prefer parsing and formatting to live in a dedicated &lt;br&gt;
parser/formatter &lt;br&gt;
API (future scope) rather than on Instant, where it would sit next to &lt;br&gt;
the &lt;br&gt;
other ISO-8601 profiles and custom patterns. If the pair stays on &lt;br&gt;
Instant, &lt;br&gt;
the name should say what it really is (a fixed RFC 3339-like profile), &lt;br&gt;
and &lt;br&gt;
the grammar should be part of what we vote on.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I agree with Larry’s DX argument here. I'd also like to note that the &lt;br&gt;
&lt;em&gt;output&lt;/em&gt; format is fixed by the RFC. The input format is less &lt;br&gt;
constrained, but the RFC guarantees that it stays true to its name by &lt;br&gt;
only accepting what ISO-8601 specifies.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;About DX - the simplicity comes from having a dedicated function to parse/format to/from ISO-8601/Instant without having to instantiate or configure anything - which is a good argument but this can be solved differently as well without introducing concepts to Instant it is not designed for e.g. by proving helper functions &lt;code&gt;Time\parseIso8601DateTimeToInstant´, &lt;/code&gt;Time\instantToIso8601DateTime`.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;ol start="14"&gt;
&lt;li&gt;until() vs Duration::between()&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Was Duration::between(Instant $a, Instant $b) considered? Calculating a &lt;br&gt;
duration feels like Duration's responsibility to me.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That suggestion breaks down when measuring elapsed time with a monotonic &lt;br&gt;
clock. PHP does not support method overloading, so it would need to &lt;br&gt;
become &lt;code&gt;Duration::between(Instant|MonoInstant, Instant|MonoInstant)&lt;/code&gt; &lt;br&gt;
which then also allows non-sense combinations.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;mh true&lt;/p&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Marc Bennewitz&lt;/p&gt;
</description><guid>217160284.726290.1793954021010@app.mailbox.org</guid><pubDate>Fri, 06 Nov 2026 08:33:40 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133015</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Larry,&lt;/p&gt;
&lt;p&gt;TLDR: why &lt;code&gt;=&amp;gt;&lt;/code&gt; rather than &lt;code&gt;as&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;As a userland developer I like what this is trying to achieve. I'm not &lt;br&gt;
knowledgeable enough about the internals to comment on the finer &lt;br&gt;
details or their ramifications - I just have a bike shedding &lt;br&gt;
suggestion/question which seemed glaring to me so I wonder if it's &lt;br&gt;
because of an ambiguous syntax or some other issue?&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;=&amp;gt;&lt;/code&gt; symbol seems odd to me, given how it's used elsewhere &lt;br&gt;
(generally as an indicator of a key/value pair, whether in an array or &lt;br&gt;
match block) and how generators/iterables are used elsewhere (ie &lt;br&gt;
foreach as)&lt;/p&gt;
&lt;p&gt;Your example is:&lt;/p&gt;
&lt;p&gt;using (file_for_write('file.txt') =&amp;gt; $fp) {&lt;/p&gt;
&lt;p&gt;Whereas to my eye this seems like a much more obvious choice:&lt;/p&gt;
&lt;p&gt;using (file_for_write('file.txt') as $fp) {&lt;/p&gt;
&lt;p&gt;Anyway, just a thought.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The v1 RFC originally used &lt;code&gt;as&lt;/code&gt;, which is what Python uses as well. &lt;br&gt;
However, a lot of people were concerned that it implied that the left side &lt;br&gt;
expression would be &amp;quot;used as&amp;quot; the right side variable.  While in some cases &lt;br&gt;
it might be, the typical case is that it's not.  The context variable is &lt;br&gt;
emitted by the context manager, but is not the same thing.&lt;/p&gt;
&lt;p&gt;At the time, no one could really agree on a better keyword.  But =&amp;gt; was &lt;br&gt;
right there waiting to be used, and already has an &amp;quot;evaluates to&amp;quot; or &lt;br&gt;
&amp;quot;yields&amp;quot; or &amp;quot;produces&amp;quot; meaning, which is roughly accurate to what happens &lt;br&gt;
here.&lt;/p&gt;
&lt;p&gt;I don't mind &lt;code&gt;as&lt;/code&gt;, personally, but the consensus before seemed to not care &lt;br&gt;
for it.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hello Larry,&lt;/p&gt;
&lt;p&gt;Using the &lt;code&gt;=&amp;gt;&lt;/code&gt; operator for this case looks inconsistent to me as well. In &lt;br&gt;
my perception, the meaning of &lt;code&gt;=&amp;gt;&lt;/code&gt; in PHP is that of mapping as a function &lt;br&gt;
in the mathematical sense: the domain mapped to the image. For example, we &lt;br&gt;
have keys mapped to values in arrays or in &lt;code&gt;yield&lt;/code&gt; generators or even in &lt;br&gt;
iterations with &lt;code&gt;foreach&lt;/code&gt;. Similarly, the usage of &lt;code&gt;=&amp;gt;&lt;/code&gt; in lambda functions &lt;br&gt;
is also consistent as we have a mapping of input to output.&lt;/p&gt;
&lt;p&gt;In this new case, however, it looks like it is used more as an assignment. &lt;br&gt;
In the statement &lt;code&gt;foreach ($iterable as $key =&amp;gt; $value)&lt;/code&gt;, the assignment &lt;br&gt;
operator is &lt;code&gt;as&lt;/code&gt;, while &lt;code&gt;=&amp;gt;&lt;/code&gt; consistently carries the meaning of a map. So, &lt;br&gt;
I would argue that using &lt;code&gt;as&lt;/code&gt; for assigning is more consistent with the &lt;br&gt;
previous syntax choices.&lt;/p&gt;
&lt;p&gt;Lazare INEPOLOGLOU &lt;br&gt;
Architecte Logiciel&lt;/p&gt;
</description><guid>CAMyk_AY31cDo57E6iG6p0u5g17w333ddC8cbzQSuV+xv0jCopg@mail.gmail.com</guid><pubDate>Fri, 06 Nov 2026 08:00:56 +0000</pubDate></item><item><title>[RFC] Sunset PECL</title><link>https://externals.io/message/133014</link><description>&lt;p&gt;Jakub,&lt;/p&gt;
&lt;p&gt;Thanks for the feedback.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It might be good to add there that pie is also distributed in a binary form so users on older PHP versions can use it too - that was one of the main blockers before AFAIK.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That's a good point, and something that was initially (and technically still) experimental. I don't know what the usage stats are like, as we don't collect any metrics on PIE side, but it's definitely getting some usage. Perhaps we should start promoting that a little more, and remove the &amp;quot;experimental&amp;quot; flag, as it does indeed help that pre-PHP 8.1 issue.&lt;/p&gt;
&lt;p&gt;I'll add a note to that effect, thank you!&lt;/p&gt;
&lt;p&gt;Thanks &lt;br&gt;
James&lt;/p&gt;
</description><guid>41d15373-a5b5-49ff-af95-b06e3042166e@app.fastmail.com</guid><pubDate>Thu, 05 Nov 2026 22:55:19 +0000</pubDate></item><item><title>[Meta] This Week In PHP Internals | November 5, 2026</title><link>https://externals.io/message/133013</link><description>&lt;p&gt;Hi Contributors,&lt;/p&gt;
&lt;p&gt;This week's episode is out. Here's the video, plus everywhere else it landed &lt;br&gt;
for visibility.&lt;/p&gt;
&lt;p&gt;Same invitation as always: if I got something wrong, reply in this thread &lt;br&gt;
and &lt;br&gt;
I'll make corrections. That includes how I'm pronouncing your names.&lt;/p&gt;
&lt;p&gt;If you'd rather read than watch, the &lt;a href="http://dev.to" rel="nofollow" target="_blank"&gt;dev.to&lt;/a&gt; post carries the full episode as &lt;br&gt;
an article, which also makes it the easiest version to quote when correcting &lt;br&gt;
me: &lt;a href="https://dev.to/projektgopher/this-week-in-php-internals-nov-5-2026-51p8" rel="nofollow" target="_blank"&gt;https://dev.to/projektgopher/this-week-in-php-internals-nov-5-2026-51p8&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;youtube &lt;a href="https://youtu.be/SFKA5PAmGNs" rel="nofollow" target="_blank"&gt;https://youtu.be/SFKA5PAmGNs&lt;/a&gt; &lt;br&gt;
r/php &lt;br&gt;
&lt;a href="https://www.reddit.com/r/PHP/comments/1xowjhw/this_week_in_php_internals_nov_5_2026/" rel="nofollow" target="_blank"&gt;https://www.reddit.com/r/PHP/comments/1xowjhw/this_week_in_php_internals_nov_5_2026/&lt;/a&gt; &lt;br&gt;
r/symfony &lt;br&gt;
&lt;a href="https://www.reddit.com/r/symfony/comments/1xowkl2/this_week_in_php_internals_nov_5_2026/" rel="nofollow" target="_blank"&gt;https://www.reddit.com/r/symfony/comments/1xowkl2/this_week_in_php_internals_nov_5_2026/&lt;/a&gt; &lt;br&gt;
r/laravel &lt;br&gt;
&lt;a href="https://www.reddit.com/r/laravel/comments/1xowntn/this_week_in_php_internals_nov_5_2026/" rel="nofollow" target="_blank"&gt;https://www.reddit.com/r/laravel/comments/1xowntn/this_week_in_php_internals_nov_5_2026/&lt;/a&gt; &lt;br&gt;
&lt;a href="http://dev.to" rel="nofollow" target="_blank"&gt;dev.to&lt;/a&gt; &lt;br&gt;
&lt;a href="https://dev.to/projektgopher/this-week-in-php-internals-nov-5-2026-51p8" rel="nofollow" target="_blank"&gt;https://dev.to/projektgopher/this-week-in-php-internals-nov-5-2026-51p8&lt;/a&gt; &lt;br&gt;
mastodon &lt;a href="https://phpc.social/@ProjektGopher/117566075927356234" rel="nofollow" target="_blank"&gt;https://phpc.social/@ProjektGopher/117566075927356234&lt;/a&gt; &lt;br&gt;
threads &lt;a href="https://www.threads.com/@projektgopher/post/DfYEoK3gQfH" rel="nofollow" target="_blank"&gt;https://www.threads.com/@projektgopher/post/DfYEoK3gQfH&lt;/a&gt; &lt;br&gt;
bsky &lt;a href="https://bsky.app/profile/projektgopher.com/post/3mzluftecdw2w" rel="nofollow" target="_blank"&gt;https://bsky.app/profile/projektgopher.com/post/3mzluftecdw2w&lt;/a&gt; &lt;br&gt;
twitter &lt;a href="https://x.com/ProjektGopher/status/2118460374249066558" rel="nofollow" target="_blank"&gt;https://x.com/ProjektGopher/status/2118460374249066558&lt;/a&gt; &lt;br&gt;
linkedin &lt;br&gt;
&lt;a href="https://www.linkedin.com/feed/update/urn:li:activity:7524227721221308417/" rel="nofollow" target="_blank"&gt;https://www.linkedin.com/feed/update/urn:li:activity:7524227721221308417/&lt;/a&gt; &lt;br&gt;
pinkary &lt;br&gt;
&lt;a href="https://pinkary.com/@ProjektGopher/questions/01a1adc4-d0e1-715a-8433-f340855d402d" rel="nofollow" target="_blank"&gt;https://pinkary.com/@ProjektGopher/questions/01a1adc4-d0e1-715a-8433-f340855d402d&lt;/a&gt; &lt;br&gt;
dev-null &lt;br&gt;
&lt;a href="https://dev-null.sh/@ProjektGopher/commits/01a1adbf-fce8-7122-bfe9-ef32f772a7c8" rel="nofollow" target="_blank"&gt;https://dev-null.sh/@ProjektGopher/commits/01a1adbf-fce8-7122-bfe9-ef32f772a7c8&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Len&lt;/p&gt;
</description><guid>CAEwAiAGNT2abSTvQCm4ycMeoA57pDykmCG-W0zZe5VB7NKc4kw@mail.gmail.com</guid><pubDate>Thu, 05 Nov 2026 22:45:00 +0000</pubDate></item><item><title>PHP 8.5.13RC1 available for testing</title><link>https://externals.io/message/133012</link><description>&lt;p&gt;PHP 8.5.13RC1 has just been released and may be downloaded from &lt;br&gt;
&lt;a href="https://downloads.php.net/~edorian/" rel="nofollow" target="_blank"&gt;https://downloads.php.net/~edorian/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Or use the git tag: php-8.5.13RC1&lt;/p&gt;
&lt;p&gt;Windows binaries are available at: &lt;br&gt;
&lt;a href="https://www.php.net/pre-release-builds.php?release=8.5.13RC1#windows" rel="nofollow" target="_blank"&gt;https://www.php.net/pre-release-builds.php?release=8.5.13RC1#windows&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please test it carefully and report any bugs at &lt;br&gt;
&lt;a href="https://github.com/php/php-src/issues" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/issues&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;8.5.13 should be expected in 2 weeks, on 19 Nov 2026.&lt;/p&gt;
&lt;p&gt;Hash values and PGP signatures can be found below or at &lt;br&gt;
&lt;a href="https://gist.github.com/edorian/a3ae237ad64517125b36523795e4546c" rel="nofollow" target="_blank"&gt;https://gist.github.com/edorian/a3ae237ad64517125b36523795e4546c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thank you, and happy testing!&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Volker Dusch, Daniel Scherzer, and Pierrick Charron&lt;/p&gt;
&lt;p&gt;php-8.5.13RC1.tar.bz2 &lt;br&gt;
SHA256 hash: bafc2cd487e3f9366ac22d6da421b674539c6a0454573bc2380f5525efdb6199 &lt;br&gt;
PGP signature: &lt;br&gt;
-----BEGIN PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;iKIEABYKAEoWIQRJ2a9rxyqA1mkXGciqI/W+nHCX1AUCaupppBsUgAAAAAAEAA5t &lt;br&gt;
YW51MiwyLjUrMS4xMiwwLDMQHGVkb3JpYW5AcGhwLm5ldAAKCRCqI/W+nHCX1NpE &lt;br&gt;
AP9w5U7nRUpqf2HYavEfuH+XodJiOtLWPGzgic6QsKnBVQEAngf6beg4mcLVFQxH &lt;br&gt;
C3TK98XrqsuEDgzghcIZ4SfHPQo= &lt;br&gt;
=U+W7 &lt;br&gt;
-----END PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;php-8.5.13RC1.tar.gz &lt;br&gt;
SHA256 hash: 1e58c71d6dfdaf6748b5419ed12b485e01a1da755400b1213b241c2029752dd5 &lt;br&gt;
PGP signature: &lt;br&gt;
-----BEGIN PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;iKIEABYKAEoWIQRJ2a9rxyqA1mkXGciqI/W+nHCX1AUCaupppBsUgAAAAAAEAA5t &lt;br&gt;
YW51MiwyLjUrMS4xMiwwLDMQHGVkb3JpYW5AcGhwLm5ldAAKCRCqI/W+nHCX1HCb &lt;br&gt;
AQCKjKqkU5DxIgTYbRbCYDSq2jWW/q2p77825m6FXtHfMQEAgR3kQJsJBpLSOUxD &lt;br&gt;
6m72MFIbOhVMilOJ/nrbtiEVWg0= &lt;br&gt;
=LJmg &lt;br&gt;
-----END PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;php-8.5.13RC1.tar.xz &lt;br&gt;
SHA256 hash: dd6fa1450ecb0ca96c081adbb1b0691facf6e6492d9a127960f295ec20bdca8f &lt;br&gt;
PGP signature: &lt;br&gt;
-----BEGIN PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;iKIEABYKAEoWIQRJ2a9rxyqA1mkXGciqI/W+nHCX1AUCaupppRsUgAAAAAAEAA5t &lt;br&gt;
YW51MiwyLjUrMS4xMiwwLDMQHGVkb3JpYW5AcGhwLm5ldAAKCRCqI/W+nHCX1DMM &lt;br&gt;
AP9BfmXAb51QBVKOiH2DN2p8g7PJ9PJQOchJ5x484OGK+AEAztP25qD1XxxZitg6 &lt;br&gt;
5fS2/qQ1WR//iQTYdpWrN5o3Qgw= &lt;br&gt;
=Wjuj &lt;br&gt;
-----END PGP SIGNATURE&lt;/p&gt;
</description><guid>CAMmyQQLd9LUJ81ZCnYaLcKCe4FYfA4Bb-5f7rXzOMxA=y1XRGQ@mail.gmail.com</guid><pubDate>Thu, 05 Nov 2026 22:02:47 +0000</pubDate></item><item><title>PHP 8.4.28RC1 is available for testing</title><link>https://externals.io/message/133011</link><description>&lt;p&gt;Hi all!&lt;/p&gt;
&lt;p&gt;PHP 8.4.28RC1 has just been released and may be downloaded from &lt;br&gt;
&lt;a href="https://downloads.php.net/~saki/" rel="nofollow" target="_blank"&gt;https://downloads.php.net/~saki/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Or use the git tag: php-8.4.28RC1&lt;/p&gt;
&lt;p&gt;Windows binaries are available at: &lt;br&gt;
&lt;a href="https://www.php.net/pre-release-builds.php#windows" rel="nofollow" target="_blank"&gt;https://www.php.net/pre-release-builds.php#windows&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please test it carefully, and report any bugs at &lt;br&gt;
&lt;a href="https://github.com/php/php-src/issues/new?template=bug_report.yml" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/issues/new?template=bug_report.yml&lt;/a&gt; on GitHub.&lt;/p&gt;
&lt;p&gt;8.4.28 should be expected in 2 weeks, i.e. on Nov 19th.&lt;/p&gt;
&lt;p&gt;Hash values and PGP signatures can be found below or at &lt;br&gt;
&lt;a href="https://gist.github.com/SakiTakamachi/d663a0ab79eefd20fe457d06d0fc383a" rel="nofollow" target="_blank"&gt;https://gist.github.com/SakiTakamachi/d663a0ab79eefd20fe457d06d0fc383a&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thank you, and happy testing!&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Calvin Buckley, Saki Takamachi, and Eric Mann&lt;/p&gt;
&lt;p&gt;php-8.4.28RC1.tar.bz2 &lt;br&gt;
SHA256 hash: &lt;br&gt;
22add2dccb59c967e12b6be46377133d2fa43373ebf26957cf9ef1b4f29c6150 &lt;br&gt;
PGP signature: &lt;br&gt;
-----BEGIN PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;iQIzBAABCAAdFiEEBhbpPZWvRxJD4mdhdwQm4X67s90FAmrqe5EACgkQdwQm4X67 &lt;br&gt;
s93TAQ//WADeOukaNsmPuHkSPetoXjD5lOG9jF3EVnKkJrgv1YDH1nMZ1Npc76bf &lt;br&gt;
b7mn7OKQnBCd+E4CW4WHzMwh2NfCRfUNGWtsP9xO+IsObUFn7mF1QDF/0XErqUPM &lt;br&gt;
O+YeCvq4OXDlPNZWvnoqFCkHnzR63eUNO8lxj6KSuCEq3gKV9r25St8ISe3lfCUg &lt;br&gt;
I/aoQElwn1MCOGeWKFpSmC1IY5TJtIL5zl/0v/a/MTLRFE+AiZOfm8BYTarE6/xj &lt;br&gt;
SfSeYjA/KlG3DNCt4/lIhEyWid1jSO2SvxGKlFqWGEplGkqfOFhxKyP6cF5iB2T5 &lt;br&gt;
S6wcBSoby511IdaZPvaBoRYAz04Vp8q6pQhX4qflxSqyEkXKXBR1iqSGGT6A7StV &lt;br&gt;
zP30KFMAKSIk0Lsu0f7sHcEhfzXP7TsjD4g1U9UR4rHyExPef0YSMUYKJW06eGoN &lt;br&gt;
+IooRcRcHmRK7rnz7QAb9Nih/i6t67POe1OX7F4cGmHZgIdCdAta4nQrNMmAcl7J &lt;br&gt;
lmJYSmBG+cO3HfQLGqe0PxC22Cn543wztokU3br125sgTraW5rkbodZJorpR5gah &lt;br&gt;
Z1pOT2Xlq8ZEVQi3JpZaPadBSM9VuITGg9KVgac9+NtHQlXNFSzAQyNvIpIZ/Q0o &lt;br&gt;
3ZHXekVwy+qT8zHQA/XWUh9QA30Q56eEnaDRMsrmH2NfTygKmk4= &lt;br&gt;
=VmZq &lt;br&gt;
-----END PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;php-8.4.28RC1.tar.gz &lt;br&gt;
SHA256 hash: &lt;br&gt;
88c9127c40a464f19249cf5f111f2b6b4d67cd2f4ecbe3b57786921103d61103 &lt;br&gt;
PGP signature: &lt;br&gt;
-----BEGIN PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;iQIzBAABCAAdFiEEBhbpPZWvRxJD4mdhdwQm4X67s90FAmrqe5EACgkQdwQm4X67 &lt;br&gt;
s90ToBAAr0pUhWfE6zNh1RT0sDHF794jFFAmQF6QJfwsSIaQOQl5FFHFx7fpHfZK &lt;br&gt;
h5fqYHHZOvYJSLsbMK2ppx+0fCLQupRqLnciM2odOx3Ed0qSue7aD1k8jT7HRYxm &lt;br&gt;
thvDXRuo4xLg35GCO35yxBAbnV7DBtuLsorLFqofbXkjwV+XyMHVciNTvySacIKI &lt;br&gt;
BrawoBLfyDTJ55tBVD+UYmbhUf61THIlgxEb5PmlTP+IT2uqfXg+6X7nFPaMMbQ1 &lt;br&gt;
qxoo6cnCvk3/YT+A4uhS+t1RPb3TriybzO/sznZgdYdM/jhOPYbrh/xlDi2TKacv &lt;br&gt;
zM1AHc2lbC/yY1lJn+nDxP5WbY6H9R+H00BYzU+1poac84Z9xk6wJV87+FdQNLT7 &lt;br&gt;
0l5vjbKw+j7s/s8Osu5uWLlysloXg0aBd9gzTs9InJd+HWJIJ1H61xDFxZDVpm80 &lt;br&gt;
wLkunC158Ub++ptDDLFpmvdrx3Cg6qiqaCnO8lks0C7Yl6wypVtXLkcjiqyUKI/u &lt;br&gt;
u/8r4zFjtEHlijtMvrFjOz0O3F1LzBNDoHhU+M+FWx2j2IDRqcXwJ0TPwFXtrkKU &lt;br&gt;
LVAizaDBs5HzY4TD9tHNEQ3E6T0brsCFAie+hkUgwnHsukpEToi9Pz8IWlksYulx &lt;br&gt;
06pStEhHIhE9tRN2EJH/N5OyIaXwR3Nk+pOYQoytU7VT8j12gVM= &lt;br&gt;
=ZHjD &lt;br&gt;
-----END PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;php-8.4.28RC1.tar.xz &lt;br&gt;
SHA256 hash: &lt;br&gt;
1d37bf6de7dd78d1cdc233709ce86c4c38825b9ad61d5790862783718087c87d &lt;br&gt;
PGP signature: &lt;br&gt;
-----BEGIN PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;iQIzBAABCAAdFiEEBhbpPZWvRxJD4mdhdwQm4X67s90FAmrqe5IACgkQdwQm4X67 &lt;br&gt;
s93EJxAAxfY6mWJM0xy66nXCwRpB5QYnTeZyaUbmcRkjNzXfEK7+0jvkE0lWwDg8 &lt;br&gt;
2yGFoOrpjBonNc12X6ULI7v8//3xW4Ob0AmTGnaeu4cK3C/R3nYHvgCj6i9VBTmb &lt;br&gt;
bSrTc7JGc6RhRZ5enenyk8WQXITt34MKUnQaW+V+oe5TysY4uPuN6Q4zp0imWNOJ &lt;br&gt;
gNPZxTrrxd97yctPfDu8qFWaLm4ZcjcgLEXFJ2s5FYbsmyWUeV1JY3xQsQQnGvLU &lt;br&gt;
Ulb44kqVMWU2SFqeC9HAZfvolvG0oxYPA5Bv42eis/F+eYBRkU0PREQq/W4udU2c &lt;br&gt;
/WWo72z2DwnTOsbnu2lySj9k2PSZaDeZJMsuHqFnqbimx/xSFG/wTtp1/SoVCZyS &lt;br&gt;
qiHHOL0yjpMwNjdIpQDIW4bSqebkRyviToK0WIjvbMMmAgQlDopzHEyCxQFHpEBd &lt;br&gt;
/qn6NPfTGw0Hkdl2P/kMJh/Kz/hdFMgjZyviXB7A/dgdiLqIniXxXQ9cj5adGKGq &lt;br&gt;
3iHBPBl5hTo/cB4KSoVLzTymY3OIX8g3nm16OY8AnwcIna9aMeZ6piAq8Ld6QZB3 &lt;br&gt;
OGg8rDkK7ZuMqcc487pGV+hTIbudlCZE/SF83L0UvTEqU8zXJudlG2wUb6+JiT37 &lt;br&gt;
AFCyholYFOCqL/ofGmNJiIN5UJLJB+xsS6/WrpIe523+zCjuOwg= &lt;br&gt;
=OXAV &lt;br&gt;
-----END PGP SIGNATURE&lt;/p&gt;
</description><guid>099248be-add5-4c81-871a-a4f4cccd86ed@php.net</guid><pubDate>Thu, 05 Nov 2026 21:47:55 +0000</pubDate></item><item><title>PHP 8.6.0RC5 is available for testing</title><link>https://externals.io/message/133010</link><description>&lt;p&gt;PHP 8.6.0RC5 has just been released and may be downloaded from &lt;br&gt;
&lt;a href="https://downloads.php.net/~svpernova09/" rel="nofollow" target="_blank"&gt;https://downloads.php.net/~svpernova09/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Or use the git tag: php-8.6.0RC5&lt;/p&gt;
&lt;p&gt;This is an early test release and not intended for production use.&lt;/p&gt;
&lt;p&gt;Windows binaries are available at: &lt;br&gt;
&lt;a href="https://www.php.net/pre-release-builds.php#windows" rel="nofollow" target="_blank"&gt;https://www.php.net/pre-release-builds.php#windows&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please test it carefully, and report any bugs at &lt;br&gt;
&lt;a href="https://github.com/php/php-src/issues/new?template=bug_report.yml" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/issues/new?template=bug_report.yml&lt;/a&gt; &lt;br&gt;
on GitHub.&lt;/p&gt;
&lt;p&gt;8.6.0 should be expected in ~2 weeks, i.e. on 19 Nov 2026.&lt;/p&gt;
&lt;p&gt;Hash values and PGP signatures can be found below or at &lt;br&gt;
&lt;a href="https://gist.github.com/svpernova09/24ecf5df03c9831844a810b37b7d2c63" rel="nofollow" target="_blank"&gt;https://gist.github.com/svpernova09/24ecf5df03c9831844a810b37b7d2c63&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thank you, and happy testing!&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Matteo Beccati, Joe Ferguson &amp;amp; Daniel Scherzer&lt;/p&gt;
&lt;p&gt;php-8.6.0RC5.tar.bz2 &lt;br&gt;
SHA256 hash: &lt;br&gt;
8d6080150fd290d6ea9725928040a2dafe564d43d08badbca130d716947264bc &lt;br&gt;
PGP signature: &lt;br&gt;
-----BEGIN PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;iQIzBAABCgAdFiEEXP8Xtk3BwkT10OrD5DU14usZAQ4FAmrqQPQACgkQ5DU14usZ &lt;br&gt;
AQ4q/g/9ECIZJPUnc2ZjlajeQzBPfRDwsqhxXHfuA+jzlsYlmgBmhHjSp+fQHbTb &lt;br&gt;
Bezd74HmI4vgCoclhH2hWxiEGWNHF5nnnC68TceK8B13RKK0SugJ5Fat1fFr0s8l &lt;br&gt;
ahw1XHDcNBeLeri1lT/C3cHu3AtND9eTRG4O/afZ4/SoqljswH7SL77N35LfIUsL &lt;br&gt;
EQZNlvOVDpyi5zcrnB76Ut0S4MhOLjm2jg8XG8c35278EGKeA6fQ/s/itbi9u0y4 &lt;br&gt;
YsvqXVnXpYdc1mzRRxyKcgEahOyMNk2g2cwhz9VibUgIngxPoKHa5LHbyl71koHb &lt;br&gt;
M37tRpokUmYuCe2L4LO22hCqA4ubAc2IhdYRdaroPauV06KVtihyVtsx/figW5W1 &lt;br&gt;
mMn5uS6Fc2T0B9+eDWc0n1c/khj0c0bkDvWBgH9kXYhEimvka4quVGkXfeJ9J0tM &lt;br&gt;
Dq3OmAPUB3o8NuBlR9w1m0VYS5vNiUMiuhhpT2y6tFqEmPKO20iWyJLi51Ley6X9 &lt;br&gt;
9l+EAGPW7TbKmQ6Zz0G8VhAOrZqd8nxg6/1vpWFBSlakMEPUgIcVHUm3QKi1SJcN &lt;br&gt;
bc0g6ZbIpm1lYNlxCcQ2KJPl42PklhyjHZl9lAHx9LrhAZADR8DNHKXc6kEEh2Pn &lt;br&gt;
9hL/xKQg9bnT73aHxvPEU6eSQOUseI8MaN/GnVPyLLNg2Sk9HuY= &lt;br&gt;
=/IJB &lt;br&gt;
-----END PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;php-8.6.0RC5.tar.gz &lt;br&gt;
SHA256 hash: &lt;br&gt;
0056e79b4622ed182882fc4cdb22158655703e9c90dccf7509e4500c8e924122 &lt;br&gt;
PGP signature: &lt;br&gt;
-----BEGIN PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;iQIzBAABCgAdFiEEXP8Xtk3BwkT10OrD5DU14usZAQ4FAmrqQPQACgkQ5DU14usZ &lt;br&gt;
AQ5RgA//ZFMdpvykWhOxZ1RWeM20cqBdBY8lK3FIoAddlOnUEENIiCYbjvyN8YhA &lt;br&gt;
5YD6P0YSj1do6VfsJJ0Df274XBXzAWGN/D0OMoX7OZUIvXBxAb9+MgHXSoQIJjfJ &lt;br&gt;
De6nCa5O5q7jw00brhER795mY7gGcgLfj3dfwnupAnIc4Q5SzvHW4stNb5jONS4q &lt;br&gt;
LMubE8tKmui89k8sHN5aj0JQSJ+OXGskbC0Xl6hhAzjD+SavwlNSJfVLXHspCqhA &lt;br&gt;
hQxC22OEC14GO8M0jnJoe106BtVrC/LR6x3XZDPlGy9ZKVStX/kVEEUspZyP72wS &lt;br&gt;
rt0OTs+9ryPw/kBAyVdyqnDw6NJFTQYGK0wc+Hn2e/nX2aRNwBhTy5FTbyK5938X &lt;br&gt;
5hHWsIqXqEAychR86GtFmbUfxMCCSKem0NMBy2Xq7us/tJVPYebNBjTPh17GC031 &lt;br&gt;
DWieh69PpV71N5yZTXZeq8+Q21nJawesg/DmjN8MGCJthOLMHAMdBxgsqI9jAa2I &lt;br&gt;
O5yEiBbEruqhDIXpPExjR+/FPAGLzsiqdAqCBNJmIE0w66c3x0r7/3db0NY/YGfr &lt;br&gt;
VAJtDWSdmOdyV6AADCmFRQv3ceT/Kc7Qgn/VmuvlYFNmfC9wBFYKbGpKSCLoD6Ik &lt;br&gt;
zNIZTHN7YEx50uvCvQw7XlXZYD79TxXjk+ZwElCN+CpV4w+Y8cA= &lt;br&gt;
=cuws &lt;br&gt;
-----END PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;php-8.6.0RC5.tar.xz &lt;br&gt;
SHA256 hash: &lt;br&gt;
abd7e3a652cfec56a2904abef7e8f37206fa07a8c1505a5a8a9bfdd25a1f1ba9 &lt;br&gt;
PGP signature: &lt;br&gt;
-----BEGIN PGP SIGNATURE-----&lt;/p&gt;
&lt;p&gt;iQIzBAABCgAdFiEEXP8Xtk3BwkT10OrD5DU14usZAQ4FAmrqQPQACgkQ5DU14usZ &lt;br&gt;
AQ68Yg//R8gLRCxtTFfNWRcQ0KxuseaG1xpBBmJVlR/rou/UjYGcwervHIXjR0DR &lt;br&gt;
jbRQ+lG3u3Is0dDuq/7ikHF3NuEnzopm0fVPbXXmnW4EclvOjY81ReFC9o7wYa5w &lt;br&gt;
WyMBXwI89DLbK1ElRvpv3068qAOME+FcnEjyJg7Ey68Wy2JXezk2UYYWBS6f2Jze &lt;br&gt;
EqK7jzedTzRNm9cMYYxmwiYliBqUf+YhiOTodsyan/MNqdhOI6aNtDAdpGIGxiGl &lt;br&gt;
gTW8N/2yyZHkWhO1xFpjoittjCPh/KnAdq+DcZNoEQ/GmkJIEbh06Q8yCy8Fegiw &lt;br&gt;
UpXtbbzcwlzDbf5hzDdqnOOO/v8NbyrV6w49+/uD42BnAN2S7pBi0j9DGUGJSi8N &lt;br&gt;
90yBKJCx3AE0n3PJotuQIk5CdJlWlAQEL2mCZaZvfQPy42yaKgt3TgW+p0RaxAGd &lt;br&gt;
t9mrc5PA80yUum1axGUvzeuZPnJdW9TttCG3oOucQMrxhdEbgGYDMOxahEL197pn &lt;br&gt;
A/lEvZpva3sFjr7gxAhD0KQXsGKxH1+9d7uWtwrRo5z0jWLiEG33JyqSrpMxg5We &lt;br&gt;
yLUw5pjd7Yquluk1ABwnAL/PRF3zQ8M5wc14md1STPPZ7YPgKI2bCqohSKAsQmJI &lt;br&gt;
cq4NWrooCCu3xpvBcn+OMvdt+ihyt5PXOVoFG4tFnsb0nXaqruc= &lt;br&gt;
=31Fj &lt;br&gt;
-----END PGP SIGNATURE&lt;/p&gt;
</description><guid>CABj1Babi=aswE0dCGOoZdAteKcR7dn2sC0xBR5i3Cx6daG1anw@mail.gmail.com</guid><pubDate>Thu, 05 Nov 2026 21:29:32 +0000</pubDate></item><item><title>[RFC] Sunset PECL</title><link>https://externals.io/message/133009</link><description>&lt;blockquote&gt;
&lt;p&gt;Folks,&lt;/p&gt;
&lt;p&gt;I'd like to introduce an RFC to lay out a timeline to sunset PECL and open &lt;br&gt;
it for discussion.&lt;/p&gt;
&lt;p&gt;RFC text is at &lt;a href="https://wiki.php.net/rfc/sunset_pecl" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/sunset_pecl&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Nice. It might be good to add there that pie is also distributed in a &lt;br&gt;
binary form so users on older PHP versions can use it too - that was one of &lt;br&gt;
the main blockers before AFAIK.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Jakub&lt;/p&gt;
</description><guid>CAEKnhAG7kYPK5dDK0gTU+FEVu6CTXBc7396h0ExKZDmgA3dY6g@mail.gmail.com</guid><pubDate>Thu, 05 Nov 2026 21:04:19 +0000</pubDate></item><item><title>[RFC] Sunset PECL</title><link>https://externals.io/message/133008</link><description>&lt;p&gt;Folks,&lt;/p&gt;
&lt;p&gt;I'd like to introduce an RFC to lay out a timeline to sunset PECL and open it for discussion.&lt;/p&gt;
&lt;p&gt;RFC text is at &lt;a href="https://wiki.php.net/rfc/sunset_pecl" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/sunset_pecl&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks &lt;br&gt;
James&lt;/p&gt;
</description><guid>51ffdfe7-9c0c-4d53-afad-fcade3391906@app.fastmail.com</guid><pubDate>Thu, 05 Nov 2026 20:34:25 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133007</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi Larry,&lt;/p&gt;
&lt;p&gt;TLDR: why &lt;code&gt;=&amp;gt;&lt;/code&gt; rather than &lt;code&gt;as&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;As a userland developer I like what this is trying to achieve. I'm not &lt;br&gt;
knowledgeable enough about the internals to comment on the finer &lt;br&gt;
details or their ramifications - I just have a bike shedding &lt;br&gt;
suggestion/question which seemed glaring to me so I wonder if it's &lt;br&gt;
because of an ambiguous syntax or some other issue?&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;=&amp;gt;&lt;/code&gt; symbol seems odd to me, given how it's used elsewhere &lt;br&gt;
(generally as an indicator of a key/value pair, whether in an array or &lt;br&gt;
match block) and how generators/iterables are used elsewhere (ie &lt;br&gt;
foreach as)&lt;/p&gt;
&lt;p&gt;Your example is:&lt;/p&gt;
&lt;p&gt;using (file_for_write('file.txt') =&amp;gt; $fp) {&lt;/p&gt;
&lt;p&gt;Whereas to my eye this seems like a much more obvious choice:&lt;/p&gt;
&lt;p&gt;using (file_for_write('file.txt') as $fp) {&lt;/p&gt;
&lt;p&gt;Anyway, just a thought.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The v1 RFC originally used &lt;code&gt;as&lt;/code&gt;, which is what Python uses as well.  However, a lot of people were concerned that it implied that the left side expression would be &amp;quot;used as&amp;quot; the right side variable.  While in some cases it might be, the typical case is that it's not.  The context variable is emitted by the context manager, but is not the same thing.&lt;/p&gt;
&lt;p&gt;At the time, no one could really agree on a better keyword.  But =&amp;gt; was right there waiting to be used, and already has an &amp;quot;evaluates to&amp;quot; or &amp;quot;yields&amp;quot; or &amp;quot;produces&amp;quot; meaning, which is roughly accurate to what happens here.&lt;/p&gt;
&lt;p&gt;I don't mind &lt;code&gt;as&lt;/code&gt;, personally, but the consensus before seemed to not care for it.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>f6b53a28-b027-4ca7-b78f-b5fc477fdf53@app.fastmail.com</guid><pubDate>Thu, 05 Nov 2026 18:30:11 +0000</pubDate></item><item><title>[RFC] Context Managers, v2</title><link>https://externals.io/message/133006</link><description>&lt;blockquote&gt;
&lt;p&gt;﻿Hi folks.  Based on the feedback and problems with the previous Context Managers RFC, Arnaud and I have a new approach to present:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/context-managers-v2" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/context-managers-v2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It basically swaps the two-method approach in favor of &amp;quot;it's a generator, you're welcome.&amp;quot;  The result is, I think, both simpler and more flexible, and resolves a number of other issues as well.  More details in the RFC.&lt;/p&gt;
&lt;p&gt;There is a linked implementation, though Arnaud warns it's only partially complete so go easy on it. :-)  But the design in the RFC is all ready for review.&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
Larry Garfield &lt;br&gt;
&lt;a href="mailto:larry@garfieldtech.com" rel="nofollow" target="_blank"&gt;larry@garfieldtech.com&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Larry,&lt;/p&gt;
&lt;p&gt;TLDR: why &lt;code&gt;=&amp;gt;&lt;/code&gt; rather than &lt;code&gt;as&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;As a userland developer I like what this is trying to achieve. I'm not knowledgeable enough about the internals to comment on the finer details or their ramifications - I just have a bike shedding suggestion/question which seemed glaring to me so I wonder if it's because of an ambiguous syntax or some other issue?&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;=&amp;gt;&lt;/code&gt; symbol seems odd to me, given how it's used elsewhere (generally as an indicator of a key/value pair, whether in an array or match block) and how generators/iterables are used elsewhere (ie foreach as)&lt;/p&gt;
&lt;p&gt;Your example is:&lt;/p&gt;
&lt;p&gt;using (file_for_write('file.txt') =&amp;gt; $fp) {&lt;/p&gt;
&lt;p&gt;Whereas to my eye this seems like a much more obvious choice:&lt;/p&gt;
&lt;p&gt;using (file_for_write('file.txt') as $fp) {&lt;/p&gt;
&lt;p&gt;Anyway, just a thought.&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Stephen&lt;/p&gt;
</description><guid>91A33156-F647-414D-A394-543161D742EA@koalephant.com</guid><pubDate>Thu, 05 Nov 2026 18:18:19 +0000</pubDate></item></channel></rss>
