<?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>Thu, 18 Jun 2026 11:18:55 +0000</pubDate><lastBuildDate>Thu, 18 Jun 2026 11:18:55 +0000</lastBuildDate><item><title>Spam on PEAR site</title><link>https://externals.io/message/131365</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;﻿On 18 June 2026 07:13:13 BST, Nick Sdot &lt;a href="mailto:php@nicksdot.dev"&gt;php@nicksdot.dev&lt;/a&gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Perhaps it would make sense to disable editing old and adding new proposals, and remove the spam. &lt;br&gt;
You'll have to talk to the pear team for that, as we don't have access.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;As a quick and dirty fix can we just deny any requests to the relevant endpoints and spam proposals at the CDN?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It doesn't sit behind a CDN. And I have no access to the server.&lt;/p&gt;
&lt;p&gt;I can drop the whole hostname from DNS.&lt;/p&gt;
&lt;p&gt;cheers &lt;br&gt;
Derick&lt;/p&gt;
</description><guid>7CA275FB-F54B-4DB4-958A-C27B3383312C@php.net</guid><pubDate>Thu, 18 Jun 2026 10:38:38 +0000</pubDate></item><item><title>Should base_convert raise a notice/warning on precision loss?</title><link>https://externals.io/message/131364</link><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;code&gt;base_convert&lt;/code&gt; converts between numerical bases, such as from decimal to hex. It stores an intermediate result in a double, and thus loses precision for big numbers. This is a problem when used on big numbers in security contexts. This semi-often happens when users want to create a &amp;quot;nice&amp;quot; random token:&lt;/p&gt;
&lt;p&gt;$token = base_convert(bin2hex(random_bytes(16)), 16, 36)); &lt;br&gt;
// &amp;quot;7nr0r976rl8o4wkwkkkcc84og&amp;quot;&lt;/p&gt;
&lt;p&gt;This looks like a nice random string, but converting it back to hex shows that it is actually mostly zero:&lt;/p&gt;
&lt;p&gt;var_dump(base_convert(&amp;quot;7nr0r976rl8o4wkwkkkcc84og&amp;quot;, 36, 16)); &lt;br&gt;
// &amp;quot;8161d6d5f47bb0000000000000000000&amp;quot;&lt;/p&gt;
&lt;p&gt;Should base_convert raise a notice or warning when it cannot convert a number precisely? On one hand, silent conversion to floating point is just fact of life for PHP. But I would argue that in this case it is unexpected because both the input and output are strings. The loss of precision is documented in the manual, but it is not obvious from the result, and it has clear security impact. What do you think?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Sjoerd Langkemper&lt;/p&gt;
</description><guid>2fc7aa25-a7ea-4a21-a690-72d8ffe60e0e@app.fastmail.com</guid><pubDate>Thu, 18 Jun 2026 09:59:47 +0000</pubDate></item><item><title>Spam on PEAR site</title><link>https://externals.io/message/131363</link><description>&lt;blockquote&gt;
&lt;p&gt;﻿On 18 June 2026 07:13:13 BST, Nick Sdot &lt;a href="mailto:php@nicksdot.dev"&gt;php@nicksdot.dev&lt;/a&gt; wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Perhaps it would make sense to disable editing old and adding new proposals, and remove the spam. &lt;br&gt;
You'll have to talk to the pear team for that, as we don't have access.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;cheers &lt;br&gt;
Derick&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As a quick and dirty fix can we just deny any requests to the relevant endpoints and spam proposals at the CDN?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Davey&lt;/li&gt;
&lt;/ul&gt;
</description><guid>8889B152-DBFC-4DA2-A405-97DEC4E6238D@daveyshafik.com</guid><pubDate>Thu, 18 Jun 2026 08:26:01 +0000</pubDate></item><item><title>Spam on PEAR site</title><link>https://externals.io/message/131362</link><description>&lt;blockquote&gt;
&lt;p&gt;Perhaps it would make sense to disable editing old and adding new proposals, and remove the spam. &lt;br&gt;
You'll have to talk to the pear team for that, as we don't have access.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;cheers &lt;br&gt;
Derick&lt;/p&gt;
</description><guid>7F8AF820-4CBF-40D6-8B39-F72ED2C5C280@php.net</guid><pubDate>Thu, 18 Jun 2026 08:05:58 +0000</pubDate></item><item><title>[RFC] Case sensitive PHP</title><link>https://externals.io/message/131361</link><description>&lt;p&gt;I think this is a good idea, however I think some care needs to be &lt;br&gt;
taken so that it doesn't impose a significant burden on end users &lt;br&gt;
compared to the benefit returned.&lt;/p&gt;
&lt;p&gt;In respect to the exact detail:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;2.9: As already noted by Juris, I also disagree with changing &lt;br&gt;
&lt;code&gt;::class&lt;/code&gt; resolution to have magic behaviour based on if the class &lt;br&gt;
exists or not (at the time of the usage) - I would prefer keeping that &lt;br&gt;
as a static transformation and raising the deprecation if the string &lt;br&gt;
is used.&lt;/li&gt;
&lt;li&gt;2.37: The example is a little unclear; could the example be updated &lt;br&gt;
to include the actual class instantiation / function call; and confirm &lt;br&gt;
if the error message references the line of the call site / the line &lt;br&gt;
of the use statement / both? Further to this, just to confirm it is &lt;br&gt;
correct; there is no difference in the error message when a use &lt;br&gt;
statement is/isn't present?&lt;/li&gt;
&lt;li&gt;2:37: When I read 'The as alias itself is not checked: use &lt;br&gt;
MyApp\Service\UserService as US is fine regardless of what US is. Only &lt;br&gt;
the namespace path being imported is validated.' then I interpreted &lt;br&gt;
that as it would mean that in the code the developer could do &lt;code&gt;new us();&lt;/code&gt; - is that correct? If not, it might be worth just reviewing the &lt;br&gt;
wording.&lt;/li&gt;
&lt;li&gt;2.39 / 2.40: I don't agree with this in the initial version - it &lt;br&gt;
makes sense to do but I would prefer this as a future change. &lt;br&gt;
Initially I would suggest that unserialize continues to work without a &lt;br&gt;
deprecation / error - the update that a developer would need to do in &lt;br&gt;
response to the deprecation occurring (for data still serialized) &lt;br&gt;
would either be having a script that unserializes and then &lt;br&gt;
reserializes the data just to correct the case, manual editing the &lt;br&gt;
data, or ignoring/suppression the deprecation; none of which seem &lt;br&gt;
particularly useful against the harm by having a special case when &lt;br&gt;
unserialzing data. (Note this relies on prohibiting multiple items &lt;br&gt;
with the same name but different case for a period from my general &lt;br&gt;
feedback)&lt;/li&gt;
&lt;li&gt;2.41: My SOAP knowledge is a bit rusty; but from memory then naming &lt;br&gt;
on the SOAP side are case sensitive; but if I am incorrect here then I &lt;br&gt;
would not enforce case sensitivity on the PHP side either (as the &lt;br&gt;
types could change on the server side with no ill effect)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;General:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What change is there to the default implementation for &lt;code&gt;__autoload&lt;/code&gt; &lt;br&gt;
(&lt;a href="https://www.php.net/manual/en/function.spl-autoload.php" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/function.spl-autoload.php&lt;/a&gt;)? Currently &lt;br&gt;
this will load class names with any case as long as the PHP files are &lt;br&gt;
lowercase in the file system (or a case insensitive file system is &lt;br&gt;
used).&lt;/li&gt;
&lt;li&gt;Would a function that can normalize the case of items currently case &lt;br&gt;
insensitive be useful to introduce alongside this (where the item &lt;br&gt;
exists in the symbol tables of course)? My thoughts are for &lt;br&gt;
compatibility with code you don't control - if a third party library &lt;br&gt;
intends to change their internal casing following this change; a &lt;br&gt;
developer may want to be able to use a proxy for accessing their &lt;br&gt;
resources that allows the old casing to work without raising the &lt;br&gt;
deprecations (or errors in PHP9) once the update is released without &lt;br&gt;
needing to immediate update the first party code. (This could be done &lt;br&gt;
in userland, but I would expect it would be more efficient to do in &lt;br&gt;
the engine)&lt;/li&gt;
&lt;li&gt;For some internal classes/functions which don't follow the expected &lt;br&gt;
rules, should aliases be introduced (or the deprecations suppressed &lt;br&gt;
during the deprecation stage). Although I rarely use it myself, I only &lt;br&gt;
realised when reviewing this RFC that 'stdClass' is not 'StdClass' for &lt;br&gt;
instance.&lt;/li&gt;
&lt;li&gt;I would suggest that for PHP9.0 then having multiple items (or at a &lt;br&gt;
minimum then autoloadable items) with the same name but with different &lt;br&gt;
casing is prohibited. I would be concerned of much harder to detect &lt;br&gt;
issues if PHP8.6 introduces the deprecation and then PHP9.0 (assuming &lt;br&gt;
that was the next release after 8.6) then removed the deprecation and &lt;br&gt;
allowed you to define the classes 'Foo' and 'foo' that a significant &lt;br&gt;
number of users would upgrade from PHP8.5 to PHP9.0 and manage to end &lt;br&gt;
up with different items that they expect are the same. I wouldn't have &lt;br&gt;
an issue allowing it in PHP10; or given the motivations given so far &lt;br&gt;
for the change keeping this prohibted.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Robert&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hello internals, &lt;br&gt;
I would like to revive the discussion about fully case-sensitive PHP. I have collected the points raised in previous discussions, and browsed all affected language features and functionalities.&lt;/p&gt;
&lt;p&gt;I still need to perform the impact analysis and the performance benchmarks. I will add them to the RFC and inform in the thread when I complete it.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/case_sensitive_php" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/case_sensitive_php&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kind regards, &lt;br&gt;
Jorg&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>CADjdLZJfhPRnhpUefDAV5pb9g5MJ=s7Knh4NS8N+CRs3YcK9Qg@mail.gmail.com</guid><pubDate>Thu, 18 Jun 2026 07:58:35 +0000</pubDate></item><item><title>[RFC] Case sensitive PHP</title><link>https://externals.io/message/131360</link><description>&lt;p&gt;Thanks for all opinions. I will apply all changes in coming days to the RFC &lt;br&gt;
content.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Is there a practical, real-world issue this solves?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Portability of the autoloading. I had a case in the past where my wrongly &lt;br&gt;
cased namespace didn't cause any problem locally, but it failed in the &lt;br&gt;
production because of different OS. This is real world-issue.&lt;/p&gt;
&lt;p&gt;However, this problem touches only namespaces and class names. If the RFC &lt;br&gt;
would be only for namespaces and classes would you be in favor of this RFC? &lt;br&gt;
It appeared in previous discussions to put all or nothing into such RFC, so &lt;br&gt;
I went along the lines, but I'm okay with dropping methods and functions. &lt;br&gt;
However, if RFC function autoloading would pass, we would have the same &lt;br&gt;
problem with functions.&lt;/p&gt;
&lt;p&gt;Kind regards, &lt;br&gt;
Jorg&lt;/p&gt;
</description><guid>CAPTD5yHjn6aseCrvrbQr5Ga+q6x6H+E7C70JuBNj45-vjC+f7A@mail.gmail.com</guid><pubDate>Thu, 18 Jun 2026 06:55:10 +0000</pubDate></item><item><title>Spam on PEAR site</title><link>https://externals.io/message/131359</link><description>&lt;p&gt;Hey all,&lt;/p&gt;
&lt;p&gt;I already mentioned this a few month ago in the &amp;quot;Deprecate PEAR and &lt;br&gt;
recommend Composer&amp;quot; RFC discussion. &lt;br&gt;
The discussion died down, no one picked up on it, and the RFC seems &lt;br&gt;
stale for now.&lt;/p&gt;
&lt;p&gt;Hence, re-sending it this as a new topic for visibility:&lt;/p&gt;
&lt;p&gt;On the PEAR website, the proposals with the IDs 710, 711, 708, 83, 662, &lt;br&gt;
700 contain online casino links (and/or other spam). &lt;br&gt;
Some of the proposals have the same account as last editor in their &lt;br&gt;
changelog -- perhaps the account was hacked.&lt;/p&gt;
&lt;p&gt;The last real proposal was in 2013. The newest three proposals sole &lt;br&gt;
purpose seems to get links in. For instance, 710 is an exact copy of 83 &lt;br&gt;
from 21 years ago.&lt;/p&gt;
&lt;p&gt;Perhaps it would make sense to disable editing old and adding new &lt;br&gt;
proposals, and remove the spam.&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Cheers&lt;/em&gt; &lt;br&gt;
Nick&lt;/p&gt;
</description><guid>55e247ff-b860-455e-b6e9-6399e61658d6@nicksdot.dev</guid><pubDate>Thu, 18 Jun 2026 06:13:13 +0000</pubDate></item><item><title>[RFC] Separation of Third-Party Extension Documentation</title><link>https://externals.io/message/131358</link><description>&lt;blockquote&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I've opened an RFC to separate third-party extension documentation &lt;br&gt;
(imagick, redis, mongodb, etc) from the official PHP manual, while &lt;br&gt;
keeping the existing DocBook tooling and infrastructure.&lt;/p&gt;
&lt;p&gt;Bundled extensions (pdo, curl, etc) are out of scope and stay in the &lt;br&gt;
official PHP manual.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/third_party_ext_documentation" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/third_party_ext_documentation&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hey Jordi,&lt;/p&gt;
&lt;p&gt;thanks for the RFC, I am all for this!&lt;/p&gt;
&lt;p&gt;From the RFC:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
Third-party extension documentation will be hosted in a single monorepo, 
mirroring the structure of the existing|doc-en|repository. Each 
extension occupies its own subdirectory, and the repository uses the 
same DocBook-based tooling as the official manual.

Commit access may be granted to extension maintainers in addition to the 
PHP documentation team. Pull requests remain open to anyone, as 
with|doc-en|.

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;How about co-locating the documentations in the extension repositories? &lt;br&gt;
Tooling could pull in the documentations from there.&lt;/p&gt;
&lt;p&gt;Moving third-party docs to a monorepo sounds like it moves parts of the &lt;br&gt;
maintenance burden and confusion from place A to place B under the same &lt;br&gt;
roof. &lt;br&gt;
The responsibility to manage access still would be with the docs team. &lt;br&gt;
Third party docs still would live in a phpc owned repository.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Benefits of co-locating:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;docs fully owned by extension&lt;/li&gt;
&lt;li&gt;no access management burden for docs team&lt;/li&gt;
&lt;li&gt;no bad look for phpc if the monorepo has hundreds of open issues/prs &lt;br&gt;
(if some maintainers don't care)&lt;/li&gt;
&lt;li&gt;maintainers can document as they go; doc changes can land in the same &lt;br&gt;
pr/commit&lt;/li&gt;
&lt;li&gt;maintainers can choose their own workflows, issue templates, etc.&lt;/li&gt;
&lt;li&gt;users can contribute where the extension lives; maintainers directly &lt;br&gt;
handle contributions&lt;/li&gt;
&lt;li&gt;maintainers triage/handle only their own issues/prs in their own repo, &lt;br&gt;
without being overwhelmed by unrelated issues/prs&lt;/li&gt;
&lt;li&gt;no confusion about why third-party docs live in official PHP repos&lt;/li&gt;
&lt;li&gt;archiving/removing docs is as easy as removing/deactivating the &lt;br&gt;
external integration source&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I think co-locating would add a lot of value, while still achieving the &lt;br&gt;
goal you propose.&lt;/p&gt;
&lt;p&gt;Admittedly, this approach would require slightly more coordination than &lt;br&gt;
your proposal. It, however, would also serve as a great first filter to &lt;br&gt;
evaluate which extensions are still maintained, hence worth documenting &lt;br&gt;
(promoting), and which not. The initial move could be automated with PRs &lt;br&gt;
to the extension repos. I'd argue the extra effort is negligible and the &lt;br&gt;
upsides outweigh it.&lt;/p&gt;
&lt;p&gt;Thoughts?&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;Cheers &lt;br&gt;
Nick&lt;/p&gt;
</description><guid>0c9798c8-262f-439b-b037-92d098458278@nicksdot.dev</guid><pubDate>Thu, 18 Jun 2026 05:42:08 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131357</link><description>&lt;blockquote&gt;
&lt;p&gt;It would at least solve the problem of accidental output prior to &lt;br&gt;
the opening tag, though I'm not sure how big of a problem that really &lt;br&gt;
is. &lt;br&gt;
I'm not sure it would even solve the problem. It's surely very easy to &lt;br&gt;
spot bogus output when the opening &amp;lt;?php is missed in a pure-code file &lt;br&gt;
(even before the file is saved if the editor is highlighting syntax). &lt;br&gt;
There is a much better chance of missing the tag in the middle of a &lt;br&gt;
template file - perhaps on a code path that isn't always taken - down &lt;br&gt;
where a lot of similar punctuation is already happening.&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>51238cb4-7fd9-4eeb-b361-6efa764a9e40@varteg.nz</guid><pubDate>Thu, 18 Jun 2026 03:12:17 +0000</pubDate></item><item><title>[RFC] Working Groups</title><link>https://externals.io/message/131356</link><description>&lt;blockquote&gt;
&lt;p&gt;I'm opening discussion on an RFC to create a policy for PHP project &lt;br&gt;
working groups:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/working_groups" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/working_groups&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I've made substantial changes to the Working Groups policy RFC that I'd &lt;br&gt;
like to call your attention to.&lt;/p&gt;
&lt;p&gt;I've moved the full text of the policy out of the RFC, replacing it with &lt;br&gt;
a simplified introduction and link to the policy pull request: &lt;br&gt;
&lt;a href="https://github.com/php/policies/pull/35" rel="nofollow" target="_blank"&gt;https://github.com/php/policies/pull/35&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Additionally, I've made the following changes to the policy text:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;clarified that approved charters grant autonomy to operate &lt;br&gt;
within the scope of the charter without separate RFCs&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;added a section on PHP Project resources (VCS repositories, &lt;br&gt;
mailing lists)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;specified that working group policies should be documented &lt;br&gt;
in the working group's repository rather than enumerated in &lt;br&gt;
its charter&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For more details, see the full diff here: &lt;br&gt;
&lt;a href="https://github.com/php/policies/pull/35/changes/3d2d111504327a50fa7cddec54d021aff00c3063" rel="nofollow" target="_blank"&gt;https://github.com/php/policies/pull/35/changes/3d2d111504327a50fa7cddec54d021aff00c3063&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Ben&lt;/p&gt;
</description><guid>20260618030711.A1D871A00BD@lists.php.net</guid><pubDate>Thu, 18 Jun 2026 03:07:11 +0000</pubDate></item><item><title>[RFC] Case sensitive PHP</title><link>https://externals.io/message/131355</link><description>&lt;blockquote&gt;
&lt;p&gt;Is there a practical, real-world issue this solves?  I have never in my life seen someone write &lt;code&gt;STRLEN()&lt;/code&gt;.  Drupal used to use TRUE/FALSE instead of true/false, but I don't know if they've ever changed that and it doesn't hurt anything.  Class names everyone should already be treating as case sensitive because of the file system.  And IDEs and SA tools have been pushing toward the &amp;quot;standard&amp;quot; casing of things for decades.  I don't really see this as an issue to solve.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I think end users see no problem being solved here. And that's okay. &lt;br&gt;
However, this change helps the engine (and any tool that deals with &lt;br&gt;
PHP symbol definitions, analyzers, LSPs, etc.) by making symbol &lt;br&gt;
management easier, as it removes the need for a folding pass required &lt;br&gt;
on every identifier encountered.&lt;/p&gt;
&lt;p&gt;This also helps make PHP more consistent, first, with other &lt;br&gt;
programming languages, and secondly, with itself, since constants in &lt;br&gt;
PHP are already case-sensitive, so making everything behave the same &lt;br&gt;
is a win.&lt;/p&gt;
&lt;p&gt;And as you said, no one writes &lt;code&gt;STRLEN&lt;/code&gt;, and people write code &lt;br&gt;
assuming that the casing they are using is correct per definition, not &lt;br&gt;
for style reasons. The deprecation phase would help people spot &lt;br&gt;
incorrect casings in their application for now, until the 9.0 upgrade.&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Seifeddine.&lt;/p&gt;
</description><guid>CAFyg4HhDiD7vEVK65i9wTk3jK9VDpUT7AaSbu9EPzNa8qwX3aA@mail.gmail.com</guid><pubDate>Thu, 18 Jun 2026 02:35:59 +0000</pubDate></item><item><title>Primary Constructors</title><link>https://externals.io/message/131354</link><description>&lt;blockquote&gt;
&lt;p&gt;Hello internals,&lt;/p&gt;
&lt;p&gt;I was reminded of my records RFC today, and one of the features of the RFC was &amp;quot;short constructors&amp;quot; generally called &amp;quot;primary constructors&amp;quot; in C#/Kotlin.&lt;/p&gt;
&lt;p&gt;They would look like this:&lt;/p&gt;
&lt;p&gt;class Point(public int $x, int $id = 0) extends Base($id);&lt;/p&gt;
&lt;p&gt;Which is just sugar for this:&lt;/p&gt;
&lt;p&gt;class Point extends Base { &lt;br&gt;
public function __construct(public int $x, int $id = 0) { &lt;br&gt;
parent::__construct($id); &lt;br&gt;
} &lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;or this:&lt;/p&gt;
&lt;p&gt;class Point extends Base { &lt;br&gt;
public int $x; &lt;br&gt;
public function __construct(int $x, int $id = 0) { &lt;br&gt;
$this-&amp;gt;x = $x; &lt;br&gt;
parent::__construct($id); &lt;br&gt;
} &lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;A class with a primary constructor &lt;em&gt;may not&lt;/em&gt; have a defined &lt;code&gt;__construct&lt;/code&gt; function. Any special initialization must be done with hooks:&lt;/p&gt;
&lt;p&gt;class Temperature( &lt;br&gt;
public float $celsius { &lt;br&gt;
set { &lt;br&gt;
if ($value &amp;lt; -273.15) { &lt;br&gt;
throw new ValueError('below absolute zero'); &lt;br&gt;
} &lt;br&gt;
$this-&amp;gt;celsius = $value; &lt;br&gt;
} &lt;br&gt;
} &lt;br&gt;
) {}&lt;/p&gt;
&lt;p&gt;new Temperature(20.0);   // ok &lt;br&gt;
new Temperature(-300.0); // ValueError: below absolute zero&lt;/p&gt;
&lt;p&gt;I'm sending this email to the list to gather additional feedback before pursuing a formal RFC proposal.&lt;/p&gt;
&lt;p&gt;— Rob&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I just realized that my examples did not demonstrate the classes with a body, but they may also have a body!&lt;/p&gt;
&lt;p&gt;— Rob&lt;/p&gt;
</description><guid>cfbb8a3a-e0d2-41ad-8903-65c6a4143aa2@app.fastmail.com</guid><pubDate>Wed, 17 Jun 2026 21:44:02 +0000</pubDate></item><item><title>Primary Constructors</title><link>https://externals.io/message/131353</link><description>&lt;p&gt;Hello internals,&lt;/p&gt;
&lt;p&gt;I was reminded of my records RFC today, and one of the features of the RFC was &amp;quot;short constructors&amp;quot; generally called &amp;quot;primary constructors&amp;quot; in C#/Kotlin.&lt;/p&gt;
&lt;p&gt;They would look like this:&lt;/p&gt;
&lt;p&gt;class Point(public int $x, int $id = 0) extends Base($id);&lt;/p&gt;
&lt;p&gt;Which is just sugar for this:&lt;/p&gt;
&lt;p&gt;class Point extends Base { &lt;br&gt;
public function __construct(public int $x, int $id = 0) { &lt;br&gt;
parent::__construct($id); &lt;br&gt;
} &lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;or this:&lt;/p&gt;
&lt;p&gt;class Point extends Base { &lt;br&gt;
public int $x; &lt;br&gt;
public function __construct(int $x, int $id = 0) { &lt;br&gt;
$this-&amp;gt;x = $x; &lt;br&gt;
parent::__construct($id); &lt;br&gt;
} &lt;br&gt;
}&lt;/p&gt;
&lt;p&gt;A class with a primary constructor &lt;em&gt;may not&lt;/em&gt; have a defined &lt;code&gt;__construct&lt;/code&gt; function. Any special initialization must be done with hooks:&lt;/p&gt;
&lt;p&gt;class Temperature( &lt;br&gt;
public float $celsius { &lt;br&gt;
set { &lt;br&gt;
if ($value &amp;lt; -273.15) { &lt;br&gt;
throw new ValueError('below absolute zero'); &lt;br&gt;
} &lt;br&gt;
$this-&amp;gt;celsius = $value; &lt;br&gt;
} &lt;br&gt;
} &lt;br&gt;
) {}&lt;/p&gt;
&lt;p&gt;new Temperature(20.0);   // ok &lt;br&gt;
new Temperature(-300.0); // ValueError: below absolute zero&lt;/p&gt;
&lt;p&gt;I'm sending this email to the list to gather additional feedback before pursuing a formal RFC proposal.&lt;/p&gt;
&lt;p&gt;— Rob&lt;/p&gt;
</description><guid>a78f6b00-1899-458f-a29e-4ac871541359@app.fastmail.com</guid><pubDate>Wed, 17 Jun 2026 21:32:05 +0000</pubDate></item><item><title>[RFC] Case sensitive PHP</title><link>https://externals.io/message/131352</link><description>&lt;blockquote&gt;
&lt;p&gt;Hello internals, &lt;br&gt;
I would like to revive the discussion about fully case-sensitive PHP. I &lt;br&gt;
have collected the points raised in previous discussions, and browsed &lt;br&gt;
all affected language features and functionalities.&lt;/p&gt;
&lt;p&gt;I still need to perform the impact analysis and the performance &lt;br&gt;
benchmarks. I will add them to the RFC and inform in the thread when I &lt;br&gt;
complete it.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/case_sensitive_php" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/case_sensitive_php&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kind regards, &lt;br&gt;
Jorg&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Is there a practical, real-world issue this solves?  I have never in my life seen someone write &lt;code&gt;STRLEN()&lt;/code&gt;.  Drupal used to use TRUE/FALSE instead of true/false, but I don't know if they've ever changed that and it doesn't hurt anything.  Class names everyone should already be treating as case sensitive because of the file system.  And IDEs and SA tools have been pushing toward the &amp;quot;standard&amp;quot; casing of things for decades.  I don't really see this as an issue to solve.&lt;/p&gt;
&lt;p&gt;But I can see where it could cause issues when making dynamic method calls, like $controller-&amp;gt;$httpMethod($request), which is something a number of smaller frameworks have done for years.&lt;/p&gt;
&lt;p&gt;So I'm -1 at this point.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>f79ba99e-9bc6-4edc-902c-f8bef925e1f0@app.fastmail.com</guid><pubDate>Wed, 17 Jun 2026 20:10:21 +0000</pubDate></item><item><title>[RFC] Case sensitive PHP</title><link>https://externals.io/message/131351</link><description>&lt;blockquote&gt;
&lt;p&gt;As for the existing stuff that you mention, we already have this casing &lt;br&gt;
salad anyway even if we simply follow IDE autocomplete&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes we do, hence why I would love for this RFC to pass and the standard &lt;br&gt;
library be unified by the standards you linked. &lt;br&gt;
However, unless compromise is made to do so this RFC would cause more &lt;br&gt;
problems than it solves.&lt;/p&gt;
&lt;p&gt;I think this is really down to a case where PHP has held onto too much &lt;br&gt;
legacy problems, and attempts to fix those problems cause more problems.&lt;/p&gt;
&lt;p&gt;For userland definitions I think this can be adapted quickly to that &lt;br&gt;
subsection, because ideally developers should be following the &lt;br&gt;
documentation. &lt;br&gt;
It doesn't &lt;strong&gt;break&lt;/strong&gt; PHP, it breaks incorrect implementations of userland &lt;br&gt;
code and helps enforce good developer behaviour, such as following the &lt;br&gt;
definition &lt;br&gt;
Eg, if the developer defines &lt;code&gt;\Movies\ILike\Moneyball&lt;/code&gt; and then the &lt;br&gt;
implementer uses \movies\ilike\MoneyBall` then I can agree, that should &lt;br&gt;
generate an error &lt;br&gt;
Implementations like this: &lt;a href="https://3v4l.org/FQKLq" rel="nofollow" target="_blank"&gt;https://3v4l.org/FQKLq&lt;/a&gt; I 100% agree, should not &lt;br&gt;
be possible.&lt;/p&gt;
&lt;p&gt;But for internal PHP definitions I'm not sure what a solution would be &lt;br&gt;
which does not completely havoc.&lt;/p&gt;
</description><guid>CAO__Xv7dwM3p1oxKrFJS4vZ2-GdXWvy_Xyy_RGtMNYdC2s3ThA@mail.gmail.com</guid><pubDate>Wed, 17 Jun 2026 15:10:03 +0000</pubDate></item><item><title>[RFC] Function Autoloading (mark 5)</title><link>https://externals.io/message/131350</link><description>&lt;blockquote&gt;
&lt;p&gt;Imagine we have an old guzzle/psr7 with stream_for function, and they use it without a qualifier. I defined a global stream_for so now I hijacked the internal library logic. Is it correct?&lt;/p&gt;
&lt;p&gt;The previous attempt with namespace pinning made more sense to me&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The concern that occurred to me is similar: if I rely on function autoloading, but forget to fully-qualify a name in the current namespace, it would accidentally work as long as some other code triggered loading of that function first. Then some small refactoring - or even a different path through the code at runtime - and it will silently fall back to a function in the global namespace instead.&lt;/p&gt;
&lt;p&gt;I think if autoloading is going to require some extra &amp;quot;ceremony&amp;quot; in the code, it would be preferable to have a declare() at the top of the file forcing the interpretation of all unqualified names (either &amp;quot;always assume current namespace&amp;quot; or &amp;quot;always assume global namespace&amp;quot;). That way, code would not change behaviour based on hard-to-predict side effects elsewhere.&lt;/p&gt;
&lt;p&gt;Rowan Tommins &lt;br&gt;
[IMSoP]&lt;/p&gt;
</description><guid>56D466F9-8C2A-4573-8BF3-4A625B87BB67@rwec.co.uk</guid><pubDate>Wed, 17 Jun 2026 14:47:22 +0000</pubDate></item><item><title>[RFC] Case sensitive PHP</title><link>https://externals.io/message/131349</link><description>&lt;blockquote&gt;
&lt;p&gt; 1. I don't think it's necessary to mess with ::class here. &lt;br&gt;
People are used to it not doing any checks. If it started doing some &lt;br&gt;
checks it would &lt;br&gt;
get confusing: why does it tell me if the case is wrong but says nothing &lt;br&gt;
if the class &lt;br&gt;
doesn't exist? And the warning is fired conditionally on whether the &lt;br&gt;
class is already &lt;br&gt;
loaded or not, which, according to RFC, is not a cool behaviour.&lt;/p&gt;
&lt;p&gt;Besides that wrong case warning would disappear and go back to silent &lt;br&gt;
in PHP 9.0, right? &lt;br&gt;
I agree, that #2.9.2 is basically a string constant not really related &lt;br&gt;
to the class itself, adding a check is not beneficial. If that string is &lt;br&gt;
used to initiate a class, there will be some another warning from this &lt;br&gt;
RFC about it anyway.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;-- &lt;br&gt;
Anton&lt;/p&gt;
</description><guid>979c7d25-cb41-4373-8890-10683ba270aa@sandfox.me</guid><pubDate>Wed, 17 Jun 2026 14:21:31 +0000</pubDate></item><item><title>[RFC] Case sensitive PHP</title><link>https://externals.io/message/131348</link><description>&lt;blockquote&gt;
&lt;p&gt;Hello internals, &lt;br&gt;
I would like to revive the discussion about fully case-sensitive PHP. I &lt;br&gt;
have collected the points raised in previous discussions, and browsed &lt;br&gt;
all affected language features and functionalities.&lt;/p&gt;
&lt;p&gt;I still need to perform the impact analysis and the performance &lt;br&gt;
benchmarks. I will add them to the RFC and inform in the thread when I &lt;br&gt;
complete it.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/case_sensitive_php" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/case_sensitive_php&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kind regards, &lt;br&gt;
Jorg&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hey,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I don't think it's necessary to mess with ::class here. &lt;br&gt;
People are used to it not doing any checks. If it started doing some &lt;br&gt;
checks it would &lt;br&gt;
get confusing: why does it tell me if the case is wrong but says nothing &lt;br&gt;
if the class &lt;br&gt;
doesn't exist? And the warning is fired conditionally on whether the &lt;br&gt;
class is already &lt;br&gt;
loaded or not, which, according to RFC, is not a cool behaviour.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Besides that wrong case warning would disappear and go back to silent &lt;br&gt;
in PHP 9.0, right?&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Is the end goal in PHP 9.0 such that ActivityLog and Activitylog &lt;br&gt;
could both be defined &lt;br&gt;
as separate classes? And I can define my own StdClass? Or would &lt;br&gt;
definitions that only &lt;br&gt;
differ by case still be separate?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;BR, &lt;br&gt;
Juris&lt;/p&gt;
</description><guid>3a8f6cd1038493881f2c43ea711f0f4a@glaive.pro</guid><pubDate>Wed, 17 Jun 2026 13:59:15 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131347</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Am 2026-06-16 21:33, schrieb Hendrik Mennen:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Reason for this: I’m native German and it’s easier for me to write an &lt;br&gt;
answer with LLM instead of using google translator for words, which &lt;br&gt;
don’t come to my mind.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The majority of participants on this list are not native speakers of &lt;br&gt;
English. Personally I'm a native German as well. Minor grammar mistakes &lt;br&gt;
or a sub-optimal choice of words is not a problem and something that &lt;br&gt;
readers will just autocorrect. If there really is an issue with &lt;br&gt;
something being completely incomprehensible, someone will ask a &lt;br&gt;
clarifying question and usually rephrasing things will keep things &lt;br&gt;
moving. I'd even say that simple language is preferable, because it &lt;br&gt;
increases the chances that folks with varying English skills will be &lt;br&gt;
able to understand what is being said.&lt;/p&gt;
&lt;p&gt;LLMs are great at generating incredibly complex sentences with words &lt;br&gt;
that sound smart, but that will make it harder for others, particularly &lt;br&gt;
non-native speakers, to understand things without resorting to tooling &lt;br&gt;
themselves.&lt;/p&gt;
&lt;p&gt;If you are really struggling with expressing yourself in English, I &lt;br&gt;
strongly suggest to write the texts in German and translate them to &lt;br&gt;
English. Or write them in English and ask a tool to just correct the &lt;br&gt;
grammar. From my experience DeepL is working well even for technical &lt;br&gt;
texts. This will ensure the resulting message matches the tone and style &lt;br&gt;
of how you would communicate.&lt;/p&gt;
&lt;p&gt;All that said, the RFC text itself also appears to come straight from an &lt;br&gt;
LLM. Notably is doesn't follow the RFC template at &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/template" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/template&lt;/a&gt; and the expected structure from an &lt;br&gt;
RFC. Some important parts are missing. While following the template is &lt;br&gt;
not strictly necessary, it is carefully designed to make sure to guide &lt;br&gt;
authors through the process and make sure they don't forget anything. I &lt;br&gt;
would strongly urge everyone to follow the template, unless they are an &lt;br&gt;
experienced RFC author and have good reasons to diverge.&lt;/p&gt;
&lt;p&gt;Specifically missing from your RFC is the “To the Ecosystem” section &lt;br&gt;
from the “RFC Impact”. The voting widgets should also be set up right &lt;br&gt;
from the start so that there is no ambiguity with how the vote will &lt;br&gt;
look.&lt;/p&gt;
&lt;p&gt;With regard to the contents of the RFC: The RFC should primarily contain &lt;br&gt;
a factual description of the &lt;em&gt;user-facing&lt;/em&gt; behavior of the proposal. The &lt;br&gt;
value for a strong proposal should become obvious by itself.&lt;/p&gt;
&lt;p&gt;If it is necessary to specifically argue against “counter-arguments” &lt;br&gt;
within the RFC itself, it is likely that the proposal itself is not &lt;br&gt;
sufficiently strong by itself. Specifically paraphrasing individual &lt;br&gt;
counter-arguments from the discussion within the RFC and then “replying” &lt;br&gt;
to the individual in question is not appropriate for the RFC text, &lt;br&gt;
especially since this easily results in a biased representation by &lt;br&gt;
accident. Discussing the merit of the RFC is what the discussion is for &lt;br&gt;
and to make it easy for folks to find the discussion the reason why the &lt;br&gt;
RFC policy mandates including a link to the discussion thread in the &lt;br&gt;
archives (the link to this discussion is missing from the RFC, only the &lt;br&gt;
pre-RFC discussion is linked).&lt;/p&gt;
&lt;p&gt;Similarly, including implementation details within the RFC text is &lt;br&gt;
typically not useful, because the implementation is likely to change &lt;br&gt;
during review and literally is an implementation detail. What is &lt;br&gt;
relevant is how the proposal affects users of PHP.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;As for the proposal itself: I don't see value in trading &lt;code&gt;&amp;amp;lt;?php&lt;/code&gt; against &lt;br&gt;
an additional &lt;code&gt;c&lt;/code&gt; in the filename. And I also don't see writing &lt;code&gt;&amp;amp;lt;?php&lt;/code&gt; &lt;br&gt;
as an issue at all. This discussion and the pre-RFC discussion probably &lt;br&gt;
already spent more time than allowing to omit &lt;code&gt;&amp;amp;lt;?php&lt;/code&gt; will ever save.&lt;/p&gt;
&lt;p&gt;If you want to proceed with the RFC, you should make sure to rework the &lt;br&gt;
RFC to make sure it includes all the important parts from the RFC &lt;br&gt;
template.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>9e89b7842abd31f45f9abb0af69d8619@bastelstu.be</guid><pubDate>Wed, 17 Jun 2026 12:53:35 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131346</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Am 2026-06-17 01:02, schrieb Sarina Corrigan:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;opening tag, though I'm not sure how big of a problem that really is. &lt;br&gt;
Could &lt;br&gt;
we expect any performance benefits from not having to parse for any &lt;br&gt;
closing &lt;br&gt;
tags? I imagine it would be minuscule if anything&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I wouldn't be surprised if that would even be a negative performance &lt;br&gt;
improvement, because it's more “conditions” that the parser needs to &lt;br&gt;
keep track of.&lt;/p&gt;
&lt;p&gt;But this is all a purely academic discussion: The file is supposed to &lt;br&gt;
sit in OPcache anyways and not be reparsed and recompiled all the time.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>235e028a206b2127ba6962ce6a80950d@bastelstu.be</guid><pubDate>Wed, 17 Jun 2026 12:18:46 +0000</pubDate></item><item><title>[RFC] Case sensitive PHP</title><link>https://externals.io/message/131345</link><description>&lt;blockquote&gt;
&lt;p&gt;I would be fully in favour of this RFC, but there is 1 hurdle which cant be ignored.&lt;/p&gt;
&lt;p&gt;What should the PHP naming convention be for these?&lt;/p&gt;
&lt;p&gt;Without deciding on what it should be we would be creating a new issue of mix-mash of uppercase, lowercase and camelcase classes for example&lt;/p&gt;
&lt;p&gt;Few examples&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DateTime is documented as Camelcase - &lt;a href="https://www.php.net/manual/en/class.datetime.php" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/class.datetime.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;PDO is documented as uppercase - &lt;a href="https://www.php.net/manual/en/class.pdo.php" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/class.pdo.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;mysqli is documentated as lowercase - &lt;a href="https://www.php.net/manual/en/set.mysqlinfo.php" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/set.mysqlinfo.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;ArrayAccess is documented as camelcase - &lt;a href="https://www.php.net/manual/en/class.arrayaccess.php" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/class.arrayaccess.php&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;PHP mixing case of definitions, at least with current system, users can choose their preferred convention and it will work. &lt;br&gt;
If we change to be case sensitive, we risk introducing a giant headache for devs, as they need to remember what different casing each different builtin class is. &lt;br&gt;
It will become a the new &lt;code&gt;($haystack, $needle)&lt;/code&gt; - &lt;code&gt;($needle, $haystack)&lt;/code&gt; problem, and won't gain love from the community.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hello internals, &lt;br&gt;
I would like to revive the discussion about fully case-sensitive PHP. I have collected the points raised in previous discussions, and browsed all affected language features and functionalities. &lt;br&gt;
I still need to perform the impact analysis and the performance benchmarks. I will add them to the RFC and inform in the thread when I complete it.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/case_sensitive_php" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/case_sensitive_php&lt;/a&gt; &lt;br&gt;
Kind regards, &lt;br&gt;
Jorg&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;I honestly can’t think of anything good that this RFC would bring. It would bring this cased salad into every  code base and require changing code if you use a consistent casing throughout your code base. Just so that &lt;em&gt;person&lt;/em&gt; and &lt;em&gt;Person&lt;/em&gt; are different? That just sounds confusing to me.&lt;/p&gt;
&lt;p&gt;I’m not sure the gain — which I’m also unsure what the gain even is — is worth it.&lt;/p&gt;
&lt;p&gt;— Rob&lt;/p&gt;
</description><guid>5fc68f13-d03b-41c5-94eb-5b8b6ebfed2e@app.fastmail.com</guid><pubDate>Wed, 17 Jun 2026 10:55:59 +0000</pubDate></item><item><title>[RFC] Case sensitive PHP</title><link>https://externals.io/message/131344</link><description>&lt;blockquote&gt;
&lt;p&gt;I would be fully in favour of this RFC, but there is 1 hurdle which cant &lt;br&gt;
be ignored.&lt;/p&gt;
&lt;p&gt;What should the PHP naming convention be for these?&lt;/p&gt;
&lt;p&gt;Without deciding on what it should be we would be creating a new issue &lt;br&gt;
of mix-mash of uppercase, lowercase and camelcase classes for example&lt;/p&gt;
&lt;p&gt;Few examples&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DateTime is documented as Camelcase - &lt;a href="https://www.php.net/manual/en/" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/&lt;/a&gt; &lt;br&gt;
class.datetime.php &lt;a href="https://www.php.net/manual/en/class.datetime.php"&gt;https://www.php.net/manual/en/class.datetime.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;PDO is documented as uppercase - &lt;a href="https://www.php.net/manual/en/" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/&lt;/a&gt; &lt;br&gt;
class.pdo.php &lt;a href="https://www.php.net/manual/en/class.pdo.php"&gt;https://www.php.net/manual/en/class.pdo.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;mysqli is documentated as lowercase - &lt;a href="https://www.php.net/manual/en/" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/&lt;/a&gt; &lt;br&gt;
set.mysqlinfo.php &lt;a href="https://www.php.net/manual/en/set.mysqlinfo.php"&gt;https://www.php.net/manual/en/set.mysqlinfo.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;ArrayAccess is documented as camelcase - &lt;a href="https://www.php.net/manual/" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/&lt;/a&gt; &lt;br&gt;
en/class.arrayaccess.php &amp;lt;&lt;a href="https://www.php.net/manual/en/" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/&lt;/a&gt; &lt;br&gt;
class.arrayaccess.php&amp;gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;PHP mixing case of definitions, at least with current system, users can &lt;br&gt;
choose their preferred convention and it will work. &lt;br&gt;
If we change to be case sensitive, we risk introducing a giant headache &lt;br&gt;
for devs, as they need to remember what different casing each different &lt;br&gt;
builtin class is. &lt;br&gt;
It will become a the new &lt;code&gt;($haystack, $needle)&lt;/code&gt; - &lt;code&gt;($needle, $haystack)&lt;/code&gt; &lt;br&gt;
problem, and won't gain love from the community. &lt;br&gt;
There are already policies for that:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://github.com/php/policies/blob/main/coding-standards-and-naming.rst" rel="nofollow" target="_blank"&gt;https://github.com/php/policies/blob/main/coding-standards-and-naming.rst&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As for the existing stuff that you mention, we already have this casing &lt;br&gt;
salad anyway even if we simply follow IDE autocomplete&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
Anton&lt;/p&gt;
</description><guid>1eb1093e-5ae5-4d05-9c4b-2393a0792862@sandfox.me</guid><pubDate>Wed, 17 Jun 2026 10:47:02 +0000</pubDate></item><item><title>[RFC] Case sensitive PHP</title><link>https://externals.io/message/131343</link><description>&lt;p&gt;I would be fully in favour of this RFC, but there is 1 hurdle which cant be &lt;br&gt;
ignored.&lt;/p&gt;
&lt;p&gt;What should the PHP naming convention be for these?&lt;/p&gt;
&lt;p&gt;Without deciding on what it should be we would be creating a new issue of &lt;br&gt;
mix-mash of uppercase, lowercase and camelcase classes for example&lt;/p&gt;
&lt;p&gt;Few examples&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DateTime is documented as Camelcase - &lt;br&gt;
&lt;a href="https://www.php.net/manual/en/class.datetime.php" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/class.datetime.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;PDO is documented as uppercase - &lt;br&gt;
&lt;a href="https://www.php.net/manual/en/class.pdo.php" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/class.pdo.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;mysqli is documentated as lowercase - &lt;br&gt;
&lt;a href="https://www.php.net/manual/en/set.mysqlinfo.php" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/set.mysqlinfo.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;ArrayAccess is documented as camelcase - &lt;br&gt;
&lt;a href="https://www.php.net/manual/en/class.arrayaccess.php" rel="nofollow" target="_blank"&gt;https://www.php.net/manual/en/class.arrayaccess.php&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;PHP mixing case of definitions, at least with current system, users can &lt;br&gt;
choose their preferred convention and it will work. &lt;br&gt;
If we change to be case sensitive, we risk introducing a giant headache for &lt;br&gt;
devs, as they need to remember what different casing each different builtin &lt;br&gt;
class is. &lt;br&gt;
It will become a the new &lt;code&gt;($haystack, $needle)&lt;/code&gt; - &lt;code&gt;($needle, $haystack)&lt;/code&gt; &lt;br&gt;
problem, and won't gain love from the community.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hello internals, &lt;br&gt;
I would like to revive the discussion about fully case-sensitive PHP. I &lt;br&gt;
have collected the points raised in previous discussions, and browsed all &lt;br&gt;
affected language features and functionalities.&lt;/p&gt;
&lt;p&gt;I still need to perform the impact analysis and the performance &lt;br&gt;
benchmarks. I will add them to the RFC and inform in the thread when I &lt;br&gt;
complete it.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/case_sensitive_php" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/case_sensitive_php&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kind regards, &lt;br&gt;
Jorg&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>CAO__Xv5nsW2jNZDw_S-LV_nRQBMOEjNn4SyRO1wE9s-j+nqXGw@mail.gmail.com</guid><pubDate>Wed, 17 Jun 2026 10:30:25 +0000</pubDate></item><item><title>[RFC] Function Autoloading (mark 5)</title><link>https://externals.io/message/131342</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;This is (by my count) a 5th attempt at adding function autoloading to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/function-autoloading-five-oh" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/function-autoloading-five-oh&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;PR:  &lt;a href="https://github.com/php/php-src/pull/22337" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22337&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Looking forward to the discussion around this one!&lt;/p&gt;
&lt;p&gt;-- pmj&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Paul!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;To make unqualified calls to &lt;code&gt;strlen()&lt;/code&gt; resolve to Foo\strlen() inside the Foo namespace, you must import the fully qualified function first&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Imagine we have an old guzzle/psr7 with stream_for function, and they &lt;br&gt;
use it without a qualifier. I defined a global stream_for so now I &lt;br&gt;
hijacked the internal library logic. Is it correct?&lt;/p&gt;
&lt;p&gt;The previous attempt with namespace pinning made more sense to me&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
Anton&lt;/p&gt;
</description><guid>c21a408f-62b3-4b01-bd2a-1947a48493fb@sandfox.me</guid><pubDate>Wed, 17 Jun 2026 10:03:07 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131341</link><description>&lt;blockquote&gt;
&lt;p&gt;Hello Internals,&lt;/p&gt;
&lt;p&gt;I'd like to start the discussion on a new RFC adding literal scalar &lt;br&gt;
types to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/literal_scalar_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/literal_scalar_types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/22314" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22314&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Seifeddine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;Based on the discussion so far, I've updated the Literal Scalar Types &lt;br&gt;
RFC to v0.2:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/literal_scalar_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/literal_scalar_types&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What changed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Strict matching is now the proposed default instead of coercion. A &lt;br&gt;
literal type would never coerce, in either typing mode, exactly how &lt;br&gt;
true, false and null already behave: passing 1 where the type is true &lt;br&gt;
is a TypeError even with strict_types disabled. The goal is a single &lt;br&gt;
rule: a type whose identity is one value matches only that value.&lt;/li&gt;
&lt;li&gt;The vote is split into three: a 2/3 vote to add int and string &lt;br&gt;
literals, a separate 2/3 vote to add float literals, and a &lt;br&gt;
simple-majority vote for the matching semantics (strict vs coercive).&lt;/li&gt;
&lt;li&gt;Float support is now its own, optional question. The RFC discusses &lt;br&gt;
the precision issue in full (0.3 won't match 0.1 + 0.2, because 0.1 + &lt;br&gt;
0.2 === 0.3 is already false today) along with the arguments for and &lt;br&gt;
against, mirroring why floats were left out of enum backing types.&lt;/li&gt;
&lt;li&gt;Documented the accepted literal syntax (0x.., 0b.., octal, 4e3, &lt;br&gt;
1_000, and so on) and why named constants, &lt;code&gt;INF&lt;/code&gt; and &lt;code&gt;NAN&lt;/code&gt; are excluded.&lt;/li&gt;
&lt;li&gt;Added RFC Impact notes for extensions and tooling (parsers, IDEs, &lt;br&gt;
formatters, linters, static analysers), plus a Future Scope section &lt;br&gt;
covering array shapes/tuples and integer range types.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Seifeddine.&lt;/p&gt;
</description><guid>CAFyg4HhHOGvk9KZPZKAH-f-ZpUjBMi2wDK+QvbtMKiAdGAZXeg@mail.gmail.com</guid><pubDate>Wed, 17 Jun 2026 04:59:51 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131340</link><description>&lt;blockquote&gt;
&lt;p&gt;Am 17.06.2026 um 02:58 schrieb Michael Morris &lt;a href="mailto:tendoaki@gmail.com"&gt;tendoaki@gmail.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Here's a thought - Instead of .phpc as an extension, why not &amp;lt;?phpc or even &amp;lt;?psf (PHP source file). Explicitly tell the engine &amp;quot;nothing should be before this other than a shebang, no further tags will be in this file.&lt;/p&gt;
&lt;p&gt;That also solves the inadverted echo problem and would be fully BC.&lt;/p&gt;
&lt;p&gt;Not convinced it would be useful, but it has fewer problems.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I could actually get behind an alternative tag that reads everything as PHP. It would at least solve the problem of accidental output prior to the opening tag, though I'm not sure how big of a problem that really is. Could we expect any performance benefits from not having to parse for any closing tags? I imagine it would be minuscule if anything&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thinking on this a bit more, if it is an independent tag it could hold directives on how the file should be parsed.&lt;/p&gt;
&lt;p&gt;&amp;lt;?psf strict ?&amp;gt; Parse the file with strict mode. Here the closing tag means we're done passing directives, no further tags will be allowed in the file and the parser will remain in PHP mode for this file.&lt;/p&gt;
&lt;p&gt;&amp;lt;?psf new_scope ?&amp;gt; Create a new scope - that is no variables, symbols or autoloaders will be shared with the file that included this one. This is an alternate way to do containers aside from creating a new function.&lt;/p&gt;
&lt;p&gt;Thoughts?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hm my core idea was, to get PHP a bit more like C#, Python and so on - they also don’t have a start -/ end tags&lt;/p&gt;
&lt;p&gt;But as a first goal, your idea seems logical&lt;/p&gt;
&lt;p&gt;Hendrik&lt;/p&gt;
</description><guid>DAA34A79-26B1-496A-9B90-A395409A1FF4@gmail.com</guid><pubDate>Wed, 17 Jun 2026 04:21:07 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131339</link><description>&lt;p&gt;On Tue, Jun 16, 2026 at 7:02 PM Sarina Corrigan &lt;a href="mailto:sarina.corrigan@gmail.com"&gt;sarina.corrigan@gmail.com&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Here's a thought - Instead of .phpc as an extension, why not &amp;lt;?phpc or &lt;br&gt;
even &amp;lt;?psf (PHP source file). Explicitly tell the engine &amp;quot;nothing should be &lt;br&gt;
before this other than a shebang, no further tags will be in this file.&lt;/p&gt;
&lt;p&gt;That also solves the inadverted echo problem and would be fully BC.&lt;/p&gt;
&lt;p&gt;Not convinced it would be useful, but it has fewer problems.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I could actually get behind an alternative tag that reads everything as &lt;br&gt;
PHP. It would at least solve the problem of accidental output prior to the &lt;br&gt;
opening tag, though I'm not sure how big of a problem that really is. Could &lt;br&gt;
we expect any performance benefits from not having to parse for any closing &lt;br&gt;
tags? I imagine it would be minuscule if anything&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thinking on this a bit more, if it is an independent tag it could hold &lt;br&gt;
directives on how the file should be parsed.&lt;/p&gt;
&lt;p&gt;&amp;lt;?psf strict ?&amp;gt; Parse the file with strict mode. Here the closing tag means &lt;br&gt;
we're done passing directives, no further tags will be allowed in the file &lt;br&gt;
and the parser will remain in PHP mode for this file.&lt;/p&gt;
&lt;p&gt;&amp;lt;?psf new_scope ?&amp;gt; Create a new scope - that is no variables, symbols or &lt;br&gt;
autoloaders will be shared with the file that included this one. This is an &lt;br&gt;
alternate way to do containers aside from creating a new function.&lt;/p&gt;
&lt;p&gt;Thoughts?&lt;/p&gt;
</description><guid>CAEUnE0eN6gHqVPLBbnaKb4K8743sjoq=JCYGtiDx7ZzTqvXTfQ@mail.gmail.com</guid><pubDate>Wed, 17 Jun 2026 00:58:54 +0000</pubDate></item><item><title>[RFC] Case sensitive PHP</title><link>https://externals.io/message/131338</link><description>&lt;blockquote&gt;
&lt;p&gt;Hello internals, &lt;br&gt;
I would like to revive the discussion about fully case-sensitive PHP. I &lt;br&gt;
have collected the points raised in previous discussions, and browsed all &lt;br&gt;
affected language features and functionalities.&lt;/p&gt;
&lt;p&gt;I still need to perform the impact analysis and the performance &lt;br&gt;
benchmarks. I will add them to the RFC and inform in the thread when I &lt;br&gt;
complete it.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/case_sensitive_php" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/case_sensitive_php&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kind regards, &lt;br&gt;
Jorg&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Jorg,&lt;/p&gt;
&lt;p&gt;I am in favor of this RFC. Case sensitivity in PHP is particularly &lt;br&gt;
challenging from a static analysis perspective, as it currently requires us &lt;br&gt;
to perform normalization and maintain tracking for both normalized and &lt;br&gt;
original names for error reporting. It is also an issue for Zend itself, &lt;br&gt;
and I see little benefit in maintaining it when the majority of languages &lt;br&gt;
listed in the RFC do not. Existing codebases could resolve these issues &lt;br&gt;
using migration tools, and a deprecation period until 9.0 is a good &lt;br&gt;
approach.&lt;/p&gt;
&lt;p&gt;However, I would like some clarification regarding the plan for 9.0 to &lt;br&gt;
&amp;quot;Promote deprecations to E_ERROR.&amp;quot; This could be interpreted in two ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Replacing &lt;code&gt;E_DEPRECATED&lt;/code&gt; with &lt;code&gt;E_ERROR&lt;/code&gt; everywhere, which I believe would &lt;br&gt;
be incorrect.&lt;/li&gt;
&lt;li&gt;Removing the deprecation and tolower in the engine so that a case &lt;br&gt;
mismatch results in an error as if the symbol does not exist. This seems &lt;br&gt;
like the correct path, but describing it as &amp;quot;promoting deprecations to &lt;br&gt;
E_ERROR&amp;quot; might be misleading. For example, a call like is_a($foo, 'FOO'); &lt;br&gt;
that previously emitted &lt;code&gt;E_DEPRECATED&lt;/code&gt; and returned true would now return &lt;br&gt;
false.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Seifeddine Gmati&lt;/p&gt;
</description><guid>CAFyg4Hhf9Vrc6g6Of_j_8u_7K4i_0ZPSGBHWQWZqfK4_zPQmeQ@mail.gmail.com</guid><pubDate>Wed, 17 Jun 2026 00:39:54 +0000</pubDate></item><item><title>[RFC] Case sensitive PHP</title><link>https://externals.io/message/131337</link><description>&lt;p&gt;Hello internals, &lt;br&gt;
I would like to revive the discussion about fully case-sensitive PHP. I &lt;br&gt;
have collected the points raised in previous discussions, and browsed all &lt;br&gt;
affected language features and functionalities.&lt;/p&gt;
&lt;p&gt;I still need to perform the impact analysis and the performance benchmarks. &lt;br&gt;
I will add them to the RFC and inform in the thread when I complete it.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/case_sensitive_php" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/case_sensitive_php&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kind regards, &lt;br&gt;
Jorg&lt;/p&gt;
</description><guid>CAPTD5yH7zxs+Dq9grvv1usqrN_Vthtf20ysytZQY_eqjkKQogQ@mail.gmail.com</guid><pubDate>Wed, 17 Jun 2026 00:03:14 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131336</link><description>&lt;blockquote&gt;
&lt;p&gt;Here's a thought - Instead of .phpc as an extension, why not &amp;lt;?phpc or &lt;br&gt;
even &amp;lt;?psf (PHP source file). Explicitly tell the engine &amp;quot;nothing should be &lt;br&gt;
before this other than a shebang, no further tags will be in this file.&lt;/p&gt;
&lt;p&gt;That also solves the inadverted echo problem and would be fully BC.&lt;/p&gt;
&lt;p&gt;Not convinced it would be useful, but it has fewer problems.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I could actually get behind an alternative tag that reads everything as &lt;br&gt;
PHP. It would at least solve the problem of accidental output prior to the &lt;br&gt;
opening tag, though I'm not sure how big of a problem that really is. Could &lt;br&gt;
we expect any performance benefits from not having to parse for any closing &lt;br&gt;
tags? I imagine it would be minuscule if anything&lt;/p&gt;
</description><guid>CAKqZJszRMyBONh8dda6UTrk78Q82-OhsU6eEnrKqvk_U=a5vqA@mail.gmail.com</guid><pubDate>Tue, 16 Jun 2026 23:02:25 +0000</pubDate></item><item><title>[RFC] Function Autoloading (mark 5)</title><link>https://externals.io/message/131335</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;This is (by my count) a 5th attempt at adding function autoloading to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/function-autoloading-five-oh" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/function-autoloading-five-oh&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;PR:  &lt;a href="https://github.com/php/php-src/pull/22337" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22337&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Looking forward to the discussion around this one!&lt;/p&gt;
&lt;p&gt;-- pmj&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I assume you saw my last attempt at this? :)&lt;/p&gt;
&lt;p&gt;The general consensus was that spl autoloader needs to go and nobody wanted to see more added to it. That being said, maybe the list has changed its mind... hopefully.&lt;/p&gt;
&lt;p&gt;— Rob&lt;/p&gt;
</description><guid>70d3f340-6590-42a8-adc4-f8f6b7659ec9@app.fastmail.com</guid><pubDate>Tue, 16 Jun 2026 22:55:48 +0000</pubDate></item><item><title>[RFC] Function Autoloading (mark 5)</title><link>https://externals.io/message/131334</link><description>&lt;p&gt;Hey Paul,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;This is (by my count) a 5th attempt at adding function autoloading to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/function-autoloading-five-oh" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/function-autoloading-five-oh&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;PR:  &lt;a href="https://github.com/php/php-src/pull/22337" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22337&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Looking forward to the discussion around this one!&lt;/p&gt;
&lt;p&gt;-- pmj&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the motivation to not do a second call to the function &lt;br&gt;
autoloaders with &amp;quot;bar&amp;quot; (global namespace) when &amp;quot;bar()&amp;quot; is being called &lt;br&gt;
in the Foo namespace and the initial call with &amp;quot;Foo\bar&amp;quot; doesn't resolve &lt;br&gt;
to anything?&lt;/p&gt;
&lt;p&gt;That would probably have much less rough edges, completely sidestepping &lt;br&gt;
the issue here with Foo\bar() not being found.&lt;/p&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Bob&lt;/p&gt;
</description><guid>AMBPR07MB120247B4BFB924D58CCB2D920E2E52@AMBPR07MB12024.eurprd07.prod.outlook.com</guid><pubDate>Tue, 16 Jun 2026 22:22:46 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131333</link><description>&lt;blockquote&gt;
&lt;p&gt;Am 16.06.2026 um 20:43 schrieb Derick Rethans &lt;a href="mailto:derick@php.net"&gt;derick@php.net&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;Am 16.06.2026 um 09:26 schrieb Davey Shafik &lt;a href="mailto:me@daveyshafik.com"&gt;me@daveyshafik.com&lt;/a&gt;:&lt;/p&gt;
&amp;lt;snip&amp;gt;
&lt;p&gt;If that friction is not worth solving, that is a legitimate position &lt;br&gt;
and I would rather hear that than dress the proposal up to look &lt;br&gt;
weightier than it is. Three honest paths from here, and I would find &lt;br&gt;
it useful if respondents could say which they are closest to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The friction is real and a small targeted addition is worth &lt;br&gt;
shipping. (what the RFC proposes)&lt;/li&gt;
&lt;li&gt;The friction is real but the mechanism is wrong. (in which case: &lt;br&gt;
what signal would you prefer? per-file declare, magic first line, &lt;br&gt;
SAPI-only, ...)&lt;/li&gt;
&lt;li&gt;The friction is not real, or not worth a language change at all.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I am strongly in camp 3; I see zero value in this.&lt;/p&gt;
&lt;p&gt;Adding meaning to a specific extension is a BC break when no extensions &lt;br&gt;
have meaning prior. In addition, it makes it difficult to identify the file &lt;br&gt;
type from the code alone if you're not familiar with it.&lt;/p&gt;
&lt;p&gt;There really isn't any friction here, any decent editor or IDE will give &lt;br&gt;
you a default file header with the open tag (at least). At worst they'll &lt;br&gt;
auto-complete after at most 2 characters.&lt;/p&gt;
&lt;p&gt;It's also important to note that other languages have explicit template &lt;br&gt;
files like Jinja or ERB, PHP does not have this and is itself essentially &lt;br&gt;
both the template language and the full programming language.&lt;/p&gt;
&lt;p&gt;Yes it's a legacy way of doing things like ASP classic or ColdFusion, but &lt;br&gt;
that doesn't make it wrong or bad.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Davey&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hi Davey,&lt;/p&gt;
&lt;p&gt;Thanks for the direct camp-3 position - the (1/2/3) framing was &lt;br&gt;
intended exactly to surface that kind of clarity, and a voter &lt;br&gt;
landing explicitly in 3 with substantive reasons is more useful &lt;br&gt;
to me than vague reservations would have been.&lt;/p&gt;
&lt;p&gt;Did you generate this reply with an LLM? It certainly reads like that.&lt;/p&gt;
&lt;p&gt;I'm asking because I find it an extremely rude thing to do, unless it is &lt;br&gt;
to assist with language.&lt;/p&gt;
&lt;p&gt;Because if people don't want to spend their own time and effort coming &lt;br&gt;
with an argument, then I also don't find it necessary for me to reply to &lt;br&gt;
them, or hear what they're saying.&lt;/p&gt;
&lt;p&gt;cheers &lt;br&gt;
Derick&lt;/p&gt;
&lt;p&gt;Hi Derick,&lt;/p&gt;
&lt;p&gt;Yes, I use AI but for assist - not to „copy-paste“ reply.&lt;/p&gt;
&lt;p&gt;Reason for this: I’m native German and it’s easier for me to write an &lt;br&gt;
answer with LLM instead of using google translator for words, which don’t &lt;br&gt;
come to my mind.&lt;/p&gt;
&lt;p&gt;To clarify my position with LLM: It’s a tool and not a placement.&lt;/p&gt;
&lt;p&gt;Hendrik&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here's a thought - Instead of .phpc as an extension, why not &amp;lt;?phpc or even &lt;br&gt;
&amp;lt;?psf (PHP source file). Explicitly tell the engine &amp;quot;nothing should be &lt;br&gt;
before this other than a shebang, no further tags will be in this file.&lt;/p&gt;
&lt;p&gt;That also solves the inadverted echo problem and would be fully BC.&lt;/p&gt;
&lt;p&gt;Not convinced it would be useful, but it has fewer problems.&lt;/p&gt;
</description><guid>CAEUnE0dSP7Dd_weWxMG+yMbduL-P4hR0hZr_FmUONh0_d582XQ@mail.gmail.com</guid><pubDate>Tue, 16 Jun 2026 22:19:46 +0000</pubDate></item><item><title>[RFC] Function Autoloading (mark 5)</title><link>https://externals.io/message/131332</link><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;This is (by my count) a 5th attempt at adding function autoloading to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/function-autoloading-five-oh" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/function-autoloading-five-oh&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;PR:  &lt;a href="https://github.com/php/php-src/pull/22337" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22337&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Looking forward to the discussion around this one!&lt;/p&gt;
&lt;p&gt;-- pmj&lt;/p&gt;
</description><guid>C7C3CE19-587C-463C-907A-C34B2CCE5551@pmjones.io</guid><pubDate>Tue, 16 Jun 2026 22:09:18 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131331</link><description>&lt;blockquote&gt;
&lt;p&gt;Am 16.06.2026 um 20:43 schrieb Derick Rethans &lt;a href="mailto:derick@php.net"&gt;derick@php.net&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Am 16.06.2026 um 09:26 schrieb Davey Shafik &lt;a href="mailto:me@daveyshafik.com"&gt;me@daveyshafik.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&amp;lt;snip&amp;gt;
&amp;gt; 
&amp;gt; If that friction is not worth solving, that is a legitimate position
&amp;gt; and I would rather hear that than dress the proposal up to look
&amp;gt; weightier than it is. Three honest paths from here, and I would find
&amp;gt; it useful if respondents could say which they are closest to:
&amp;gt; 
&amp;gt; 1. The friction is real and a small targeted addition is worth
&amp;gt;   shipping. (what the RFC proposes)
&amp;gt; 2. The friction is real but the mechanism is wrong. (in which case:
&amp;gt;   what signal would you prefer? per-file declare, magic first line,
&amp;gt;   SAPI-only, ...)
&amp;gt; 3. The friction is not real, or not worth a language change at all.
&lt;p&gt;I am strongly in camp 3; I see zero value in this.&lt;/p&gt;
&lt;p&gt;Adding meaning to a specific extension is a BC break when no extensions have meaning prior. In addition, it makes it difficult to identify the file type from the code alone if you're not familiar with it.&lt;/p&gt;
&lt;p&gt;There really isn't any friction here, any decent editor or IDE will give you a default file header with the open tag (at least). At worst they'll auto-complete after at most 2 characters.&lt;/p&gt;
&lt;p&gt;It's also important to note that other languages have explicit template files like Jinja or ERB, PHP does not have this and is itself essentially both the template language and the full programming language.&lt;/p&gt;
&lt;p&gt;Yes it's a legacy way of doing things like ASP classic or ColdFusion, but that doesn't make it wrong or bad.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Davey&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Davey,&lt;/p&gt;
&lt;p&gt;Thanks for the direct camp-3 position - the (1/2/3) framing was &lt;br&gt;
intended exactly to surface that kind of clarity, and a voter &lt;br&gt;
landing explicitly in 3 with substantive reasons is more useful &lt;br&gt;
to me than vague reservations would have been.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Did you generate this reply with an LLM? It certainly reads like that.&lt;/p&gt;
&lt;p&gt;I'm asking because I find it an extremely rude thing to do, unless it is to assist with language.&lt;/p&gt;
&lt;p&gt;Because if people don't want to spend their own time and effort coming with an argument, then I also don't find it necessary for me to reply to them, or hear what they're saying.&lt;/p&gt;
&lt;p&gt;cheers &lt;br&gt;
Derick&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Derick,&lt;/p&gt;
&lt;p&gt;Yes, I use AI but for assist - not to „copy-paste“ reply.&lt;/p&gt;
&lt;p&gt;Reason for this: I’m native German and it’s easier for me to write an answer with LLM instead of using google translator for words, which don’t come to my mind.&lt;/p&gt;
&lt;p&gt;To clarify my position with LLM: It’s a tool and not a placement.&lt;/p&gt;
&lt;p&gt;Hendrik&lt;/p&gt;
</description><guid>AB66FD74-11B2-4572-9854-0D7F6EAC4627@gmail.com</guid><pubDate>Tue, 16 Jun 2026 19:33:59 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131330</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Am 16.06.2026 um 09:26 schrieb Davey Shafik &lt;a href="mailto:me@daveyshafik.com"&gt;me@daveyshafik.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&amp;lt;snip&amp;gt;
&amp;gt; 
&amp;gt; If that friction is not worth solving, that is a legitimate position
&amp;gt; and I would rather hear that than dress the proposal up to look
&amp;gt; weightier than it is. Three honest paths from here, and I would find
&amp;gt; it useful if respondents could say which they are closest to:
&amp;gt; 
&amp;gt; 1. The friction is real and a small targeted addition is worth
&amp;gt;    shipping. (what the RFC proposes)
&amp;gt; 2. The friction is real but the mechanism is wrong. (in which case:
&amp;gt;    what signal would you prefer? per-file declare, magic first line,
&amp;gt;    SAPI-only, ...)
&amp;gt; 3. The friction is not real, or not worth a language change at all.
&lt;p&gt;I am strongly in camp 3; I see zero value in this.&lt;/p&gt;
&lt;p&gt;Adding meaning to a specific extension is a BC break when no extensions have meaning prior. In addition, it makes it difficult to identify the file type from the code alone if you're not familiar with it.&lt;/p&gt;
&lt;p&gt;There really isn't any friction here, any decent editor or IDE will give you a default file header with the open tag (at least). At worst they'll auto-complete after at most 2 characters.&lt;/p&gt;
&lt;p&gt;It's also important to note that other languages have explicit template files like Jinja or ERB, PHP does not have this and is itself essentially both the template language and the full programming language.&lt;/p&gt;
&lt;p&gt;Yes it's a legacy way of doing things like ASP classic or ColdFusion, but that doesn't make it wrong or bad.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Davey&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Davey,&lt;/p&gt;
&lt;p&gt;Thanks for the direct camp-3 position - the (1/2/3) framing was &lt;br&gt;
intended exactly to surface that kind of clarity, and a voter &lt;br&gt;
landing explicitly in 3 with substantive reasons is more useful &lt;br&gt;
to me than vague reservations would have been.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Did you generate this reply with an LLM? It certainly reads like that.&lt;/p&gt;
&lt;p&gt;I'm asking because I find it an extremely rude thing to do, unless it is to assist with language.&lt;/p&gt;
&lt;p&gt;Because if people don't want to spend their own time and effort coming with an argument, then I also don't find it necessary for me to reply to them, or hear what they're saying.&lt;/p&gt;
&lt;p&gt;cheers &lt;br&gt;
Derick&lt;/p&gt;
</description><guid>A3EF75A2-0A0C-4BC5-8614-A383D81A0A86@php.net</guid><pubDate>Tue, 16 Jun 2026 18:43:55 +0000</pubDate></item><item><title>[RFC] Separation of Third-Party Extension Documentation</title><link>https://externals.io/message/131329</link><description>&lt;blockquote&gt;
&lt;p&gt;What happens if the RFC fails? Do we just do nothing and let the PHP &lt;br&gt;
manual deteriorate further?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Are there any abandoned extensions that make no sense to keep the &lt;br&gt;
documentation for? Wouldn't it be wiser to prune the docs of these &lt;br&gt;
abandoned extensions and then deal with the remaining per the outcome of &lt;br&gt;
the RFC.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Regardless of whether this RFC passes or not, the documentation team &lt;br&gt;
will continue trying to prune/archive documentation for genuinely &lt;br&gt;
abandoned extensions where appropriate.&lt;/p&gt;
&lt;p&gt;That said, it is not always straightforward. As these are third-party &lt;br&gt;
extensions, we do not always have a clear picture of their maintenance &lt;br&gt;
(or usage) status, and a lack of recent updates does not necessarily &lt;br&gt;
mean an extension is no longer functional with current PHP versions. &lt;br&gt;
Extensions could remain stable for years without requiring active changes.&lt;/p&gt;
&lt;p&gt;Because of that, determining what should actually be removed or archived &lt;br&gt;
requires careful consideration. This RFC would also help clarify the &lt;br&gt;
boundaries and expectations around maintaining third-party extension &lt;br&gt;
documentation going forward.&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
Regards,&lt;/p&gt;
&lt;p&gt;Jordi Kroon&lt;/p&gt;
</description><guid>20260616182641.872F21A00BD@lists.php.net</guid><pubDate>Tue, 16 Jun 2026 18:26:41 +0000</pubDate></item><item><title>[RFC] Separation of Third-Party Extension Documentation</title><link>https://externals.io/message/131328</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I've opened an RFC to separate third-party extension documentation &lt;br&gt;
(imagick, redis, mongodb, etc) from the official PHP manual, while &lt;br&gt;
keeping the existing DocBook tooling and infrastructure.&lt;/p&gt;
&lt;p&gt;Bundled extensions (pdo, curl, etc) are out of scope and stay in the &lt;br&gt;
official PHP manual.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/third_party_ext_documentation" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/third_party_ext_documentation&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It has been 2 weeks since the last major change. &lt;br&gt;
I am planning to open voting this Friday (June 19).&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
Regards,&lt;/p&gt;
&lt;p&gt;Jordi Kroon&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What happens if the RFC fails? Do we just do nothing and let the PHP manual &lt;br&gt;
deteriorate further?&lt;/p&gt;
&lt;p&gt;Are there any abandoned extensions that make no sense to keep the &lt;br&gt;
documentation for? Wouldn't it be wiser to prune the docs of these &lt;br&gt;
abandoned extensions and then deal with the remaining per the outcome of &lt;br&gt;
the RFC.&lt;/p&gt;
</description><guid>CAGBsUrezgUOJYwC=e7NJNvLtGdDGkAwafgGX4piPo-NQ9Luj+Q@mail.gmail.com</guid><pubDate>Tue, 16 Jun 2026 17:51:46 +0000</pubDate></item><item><title>[RFC] Separation of Third-Party Extension Documentation</title><link>https://externals.io/message/131327</link><description>&lt;blockquote&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I've opened an RFC to separate third-party extension documentation &lt;br&gt;
(imagick, redis, mongodb, etc) from the official PHP manual, while &lt;br&gt;
keeping the existing DocBook tooling and infrastructure.&lt;/p&gt;
&lt;p&gt;Bundled extensions (pdo, curl, etc) are out of scope and stay in the &lt;br&gt;
official PHP manual.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/third_party_ext_documentation" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/third_party_ext_documentation&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It has been 2 weeks since the last major change. &lt;br&gt;
I am planning to open voting this Friday (June 19).&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
Regards,&lt;/p&gt;
&lt;p&gt;Jordi Kroon&lt;/p&gt;
</description><guid>20260616174301.16B691A00BD@lists.php.net</guid><pubDate>Tue, 16 Jun 2026 17:43:00 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131326</link><description>&lt;p&gt;Hey Larry,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Am 16.06.2026 um 17:16 schrieb Larry Garfield &lt;a href="mailto:larry@garfieldtech.com"&gt;larry@garfieldtech.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;While this RFC works alongside the pattern matching proposal by Larry and Ilija, neither requires the other. The two are unrelated for several reasons.&lt;/p&gt;
&lt;p&gt;So to answer your question, no, I am not looking for pattern matching. I see these as two distinct features that address different needs within the language.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don't believe they are addressing entirely different needs. I believe the feature that static analysis tools support is pattern matching more than it is typing. The question for me becomes whether patterns be represented through types, or whether they should be matched against values.&lt;/p&gt;
&lt;p&gt;Strictly denoting types and validating patterns are two separate concerns. One asks &amp;quot;What can I do with this?&amp;quot; while the other asks &amp;quot;Is this within expected bounds?&amp;quot;. I am personally not against validating patterns within type declarations, as is supported in Typescript, Scala (I believe), and to an extent PHP with false|true. But I do believe they are different concerns.&lt;/p&gt;
&lt;p&gt;I also think that, this being a form of pattern matching, if approved would set a direction for the pattern matching RFC to treat patterns more closely as types than assertions and guards (as their RFC currently proposes). I am again not saying this is a bad thing, but it is worth acknowledging.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Sarina,&lt;/p&gt;
&lt;p&gt;I don't think we disagree here. I already said above that I think &lt;br&gt;
pattern matching should match against types with variable binding; this &lt;br&gt;
actually makes pattern matching easier because to expand it, you just &lt;br&gt;
have to expand the type system, and patterns get expanded for free.&lt;/p&gt;
&lt;p&gt;However, I think this is a discussion for the pattern matching RFC, not &lt;br&gt;
for the literal types RFC.&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Seifeddine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is interesting.  We've approached patterns as a coincidental superset of the type system.  That is, (almost) any type declaration is a valid pattern, but not because patterns are types; because we've implemented patterns to mirror types.&lt;/p&gt;
&lt;p&gt;Patterns &lt;em&gt;as&lt;/em&gt; types would be a completely different approach.  I can see the appeal, but there's a number of issues there:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Performance.  Patterns do a lot more work than a type check right now.  If patterns cropped up in function signatures all over the place, that would have a notable, though currently unclear and hard to predict, impact on performance.  (Far more inconsistent than, say, reified generics would have...)&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;The performance impact is certainly lower than manually validating all over the place. &lt;br&gt;
Also, this would be a good motivation to invest into moving the type checks for known functions onto the caller side, and eliding them completely if the variable is unmodified. By now we have knowledge when variables can definitely not leak (are no references, no varvars or extract etc. are used) and check whether and what they are being assigned during the lifetime of the function.&lt;/p&gt;
&lt;p&gt;In fact, using &amp;quot;int &amp;amp; &amp;lt; 10 &amp;amp; &amp;gt; 1&amp;quot; would give pretty strong bounds for opcaches data flow analysis to use too, giving much better hints at what integers will never be promoted to float, reducing the amount of guards necessary in JIT for example. An int which never can be &amp;lt; 0 for example saves a bounds check in one direction as well when working with packed arrays. &lt;br&gt;
I.e. depending on the patterns and their integration into opcache quite a bit of potential could be unlocked.&lt;/p&gt;
&lt;p&gt;But yes, you can always find worst case performances.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="2"&gt;
&lt;li&gt;Complexity.  Expanding the type system to full patterns seems like it would be... hard.  And possibly internal-API breaking.  I could be completely wrong here, but it sounds like a fairly drastic change.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Why would it be particularly hard? We already have dedicated types APIs for stuff like type intersection and union. I don't think there would be a lot of impact.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="3"&gt;
&lt;li&gt;Repeatability.  For this to work, I think it would &lt;em&gt;have&lt;/em&gt; to include type definitions, which have always hit a discussion wall in the past as no one can agree on their design.  Something like:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;type positiveInt =  int &amp;amp; &amp;gt;0; &lt;br&gt;
type UserId = int; &lt;br&gt;
type order = 'asc'|'desc';&lt;/p&gt;
&lt;p&gt;function foo(positiveInt $val) { ... } // Guaranteed to be an integer greater than 0&lt;/p&gt;
&lt;p&gt;function bar(UserId $id) { ... } // Would this accept a positiveInt?  Debatable.&lt;/p&gt;
&lt;p&gt;There's a sizable rabbit hole here.  One could argue even that for scalar literal types we should have proper type defs.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;From the perspective of an autoloader, a type name is just like any other class name. &lt;br&gt;
This is more composers problem to solve (they possibly could include a per-namespace fallback to a default.php or something, where you'd define all types of a namespace in). &lt;br&gt;
We should have type names eventually, but I consider them separate from the basic pattern feature. Should be done, but separate RFC with its own concerns, and I also suppose a pretty simple RFC actually!&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="4"&gt;
&lt;li&gt;Variable binding.  Let me be clear: Variable binding &lt;em&gt;is&lt;/em&gt; the feature that makes pattern matching worthwhile.  It's the reason we started working on it; we believe it is a prerequisite for properly implementing ADTs/&amp;quot;tagged enums.&amp;quot;  So even if patterns become types, there will still be a need for an extended variable binding syntax that works only inline, not as part of a type declaration.  What the complexity impact of that would be, I have no idea.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don't think we would need to include binding in a first version of this.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If there is a consensus to go down this rabbit hole, I am not opposed to it.  But it's a very deep rabbit hole, and exploring it would guarantee that neither patterns nor scalar literal types make it into this version.  It would probably also entail 3-4 RFCs total, all of which would be kind of half-arsed on their own because they're part of a set; and PHP has been extremely, &lt;em&gt;extremely&lt;/em&gt; bad at coordinating and working with that in the past.  (Maybe a place for working groups?)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I also don't think that pattern matching needs particular changes to fit this. The syntax of pattern matching is pretty fine and could be just 1:1 translated to function args.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Bob&lt;/p&gt;
</description><guid>F124E80C-A367-4288-AC60-5780883F8DF1@hotmail.com</guid><pubDate>Tue, 16 Jun 2026 16:25:36 +0000</pubDate></item><item><title>Containers. (was Re:  Two-step creation for PHP modules)</title><link>https://externals.io/message/131325</link><description>&lt;blockquote&gt;
&lt;p&gt;Le 16/06/2026 à 06:45, Michael Morris a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Namespaces being just a globally accessible and define-able symbols &lt;br&gt;
system is exactly why, so far, a PHP package cannot define &amp;quot;private &lt;br&gt;
internal&amp;quot; code. The way the language works already allows &lt;br&gt;
autoload-hijacking in order to override code from external libs, or even &lt;br&gt;
hack the visibility (like removing &amp;quot;final&amp;quot; or &amp;quot;private&amp;quot; keywords before &lt;br&gt;
autoloading the file...).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;PHP has never kept people from shooting themselves in the foot. And in the &lt;br&gt;
past it's came with some big guns too (Register Globals in PHP 3 anyone?). &lt;br&gt;
Enforcing namespace visibility will come at a cost in performance, and it &lt;br&gt;
won't be enough to stop people from shooting themselves because PHP code is &lt;br&gt;
quite mutable. I don't see much of a point in trying to guide people's &lt;br&gt;
coding, especially in a language that doesn't have a set paradigm.  That &lt;br&gt;
is, in Java, you're using classes. In PHP you can approach things that way, &lt;br&gt;
but you write purely procedurally. You can use the language as it was &lt;br&gt;
originally conceived - a templating language.&lt;/p&gt;
&lt;p&gt;I think it's morally good to bring new features to the core that disallow &lt;br&gt;
someone from shooting themselves in the foot. Readonly classes, property &lt;br&gt;
hooks, etc., are methods for maintainers to be able to stricten their code &lt;br&gt;
so that end users don't shoot themselves in the foot. Yet we have the &lt;br&gt;
Reflection API that permits a huge lot of things, and combining with &lt;br&gt;
autoload hacking or bounded closures, it means that all these requirements, &lt;br&gt;
strictening tools, etc., are &lt;em&gt;contracts&lt;/em&gt; we sign with maintainers. If &lt;br&gt;
someone uses any hacky tool built in PHP to override its native behavior, &lt;br&gt;
it's at their own risk. But the language allows it.&lt;/p&gt;
&lt;p&gt;With my suggestion for modules, having all structures being declared &lt;br&gt;
globally but with a prefix still allows someone to hack into it. It just &lt;br&gt;
lowers the pressure on how it's developed in the core, in order for it to &lt;br&gt;
be both simple to use, but also simpler to implement. Doesn't prevent feet &lt;br&gt;
shots, but has a big warning sign nonetheless.&lt;/p&gt;
&lt;p&gt;When you say modules, what are talking about, because multiple languages &lt;br&gt;
implement &amp;quot;modules&amp;quot; in different ways. JavaScript is the most well known, &lt;br&gt;
but Go also has modules and they are quite different and support versioning &lt;br&gt;
out of the box. In each of these examples there is a requirement that the &lt;br&gt;
programmer write code to import the modules at some place either in the &lt;br&gt;
project (Go) or in every bloody file in the project (JavaScript). PHP &lt;br&gt;
doesn't require this, instead autoloading symbol definitions as they are &lt;br&gt;
encountered.&lt;/p&gt;
&lt;p&gt;There are different terms available for the things we talk about, so as a &lt;br&gt;
reminder to the two/three people reading this message:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Module = file, similar to JS. This implies that everything defined &lt;br&gt;
in the file is private, unless &amp;quot;publicly exposed&amp;quot;, either via a &amp;quot;public&amp;quot; &lt;br&gt;
keyword (as Larry suggests in his modules-brainstorming document), or an &lt;br&gt;
&amp;quot;export&amp;quot; statement (similar to JS/TS).&lt;/li&gt;
&lt;li&gt;Module = package, in that case, this means that a module is composed &lt;br&gt;
of several files, but a module/package needs an entrypoint to define its &lt;br&gt;
components. Larry's aforementioned idea is about using an INI file as &lt;br&gt;
entrypoint that prevents double-loading of a list of files, but this could &lt;br&gt;
be implemented with other methods: my proposal for &amp;quot;module = file&amp;quot; could &lt;br&gt;
add a &amp;quot;package&amp;quot; system without a need for an INI file, and based purely on &lt;br&gt;
the list of publicly available structures from the main imported file, but &lt;br&gt;
implies a bidirectional relationship between the &amp;quot;main package file&amp;quot; (aka &lt;br&gt;
&amp;quot;entrypoint&amp;quot;) and the &amp;quot;package-included-only file&amp;quot;. It's just a different &lt;br&gt;
approach.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of these approaches removes namespaces, and considering my first idea &lt;br&gt;
and re-thinking it after all the comments in here, I think focusing on &lt;br&gt;
&amp;quot;using namespaces for that&amp;quot; is definitely the best approach. My proposal &lt;br&gt;
still stands, it just needs an update to better use namespaces for that &lt;br&gt;
need.&lt;/p&gt;
&lt;p&gt;NPM (not Node, node is the engine not the package/dependency manager) does &lt;br&gt;
this using aliases. PHP doesn't have a way to alias symbols at compile &lt;br&gt;
time. It would be nice if it did - I've suggested it as a parameter to &lt;br&gt;
include not knowing at the time of the suggestion that include isn't a &lt;br&gt;
function, it's a statement, so &lt;code&gt;include &amp;quot;file.php&amp;quot;&lt;/code&gt; is the same as &lt;br&gt;
&lt;code&gt;include(&amp;quot;file.php&amp;quot;)&lt;/code&gt;. Setting that aside, PHP projects rarely execute the &lt;br&gt;
include themselves - they let an autoloader handle it, so the autoloader &lt;br&gt;
must know which version to load. This isn't something that even NPM does - &lt;br&gt;
it just aliases and makes both libraries available. The caller still must &lt;br&gt;
specify which library is being pulled in.&lt;/p&gt;
&lt;p&gt;Node modules have a single point of entry, defined in the package.json &lt;br&gt;
file but usually index.js. In most Node packages this index.js imports all &lt;br&gt;
the public parts of the package and immediately exports them. Further, an &lt;br&gt;
import in node is an object (as is everything in JavaScript) that &lt;br&gt;
corresponds to that file.  Hence&lt;/p&gt;
&lt;p&gt;import { foo, bar } from 'MyPackage';&lt;/p&gt;
&lt;p&gt;This is using JavaScripts dereference mechanic to pluck members of an &lt;br&gt;
object into the current symbol table.  I could go on, but I think it's more &lt;br&gt;
on topic to just say that Node's import/export mechanic, elegant as it &lt;br&gt;
looks, is highly bound to JavaScript's scope rules and  how its symbol &lt;br&gt;
table works.  These aren't compatible with PHP.&lt;/p&gt;
&lt;p&gt;I'm a bit familiar with Node.js's import model. PHP could be partly &lt;br&gt;
compatible with this in the future, but complete scoped encapsulation of a &lt;br&gt;
single PHP file is too much of a paradigm change for PHP itself. My &lt;br&gt;
proposal is making this &amp;quot;private&amp;quot; by prepending a null character and hash &lt;br&gt;
to all &amp;quot;included modules&amp;quot; whatever their kind, so that it &lt;em&gt;feels&lt;/em&gt; private, &lt;br&gt;
but still behaves similarly to how PHP currently works. &lt;br&gt;
Less maintenance for the core team, zero BC break (purely additive and &lt;br&gt;
opt-in), can be transparent for the end-user (and &lt;em&gt;is&lt;/em&gt; transparent for &lt;br&gt;
transient dependencies), still overridable and hackable by developers. Some &lt;br&gt;
of the reasons why PHP became famous in the first place.&lt;/p&gt;
&lt;p&gt;For one, PHP has two symbol tables - one for variables (which is why all &lt;br&gt;
variables start with $ ) and one for everything else. Variables are &lt;br&gt;
affected by function scope, nothing else is. For example, if you define a &lt;br&gt;
function within a function in JavaScript that function will be private to &lt;br&gt;
the function it is defined in - it can't be seen in other scopes. In PHP &lt;br&gt;
the function will be visible on the symbol table.&lt;/p&gt;
&lt;p&gt;For another, Node gives each file its own module scope. To move a symbol &lt;br&gt;
from one file to another you should use export and import. This creates a &lt;br&gt;
clear chain of custody for objects and symbols, but by God it also creates &lt;br&gt;
a LOT of boilerplate that the PHP community has no interest in replicating.&lt;/p&gt;
&lt;p&gt;Without the chain of custody you rapidly run into trouble. It doesn't &lt;br&gt;
matter if you try to allow the user to put a prefix on the namespace as I &lt;br&gt;
once suggested, or have PHP's engine prefix it automagically somehow - you &lt;br&gt;
still need to correctly disambiguate every blasted reference to that &lt;br&gt;
namespace. This is no easy task - take a look at the code of Strauss - &lt;br&gt;
&lt;a href="https://github.com/BrianHenryIE/strauss" rel="nofollow" target="_blank"&gt;https://github.com/BrianHenryIE/strauss&lt;/a&gt; That project allows you to &lt;br&gt;
rewrite a package with a new namespace, in effect doing it in userland. But &lt;br&gt;
as a precaution it prefixes every single package imported and severs the &lt;br&gt;
tie back to the original packagist.  Strauss is used by several WordPress &lt;br&gt;
plugins to make composer library use possible while still remaining &lt;br&gt;
portable between WordPress sites.&lt;/p&gt;
&lt;p&gt;Interesting, and auto-prefixing namespaces for module=packages systems is &lt;br&gt;
IMO the easiest way to implement this without breaking the compiler nor the &lt;br&gt;
engine. It keeps everything as-is, and visually provides all that's needed &lt;br&gt;
for a &amp;quot;modules/packages&amp;quot; system to work: encapsulated private structures, &lt;br&gt;
an explicit public API, and the ability to load the same structures in the &lt;br&gt;
same namespaces because they are internally hidden with a hash, similarly &lt;br&gt;
to anonymous classes.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The only drawback of having modules like that would be that final &lt;br&gt;
dependency trees in Composer would be non-flat, but again, I think this &lt;br&gt;
non-flat system should be opt-in. Similarly to how flat systems are &lt;br&gt;
opt-in in the Node.js ecosystem (and trust me, I've tried to enforce &lt;br&gt;
&amp;quot;flat&amp;quot; dependencies resolutions in certain Node projects, and it's a &lt;br&gt;
huge hassle). Luckily, the PHP ecosystem is quite fine so far, compared &lt;br&gt;
to Node, and I would definitely keep the &amp;quot;flat&amp;quot; system in Composer for &lt;br&gt;
as long as possible, and make non-flat resolutions only case-specific &lt;br&gt;
(which is rare, and usually framework-dependent, like with Wordpress &lt;br&gt;
plugins for instance).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don't think it's a reasonable ask of Composer or any other dependency &lt;br&gt;
manager to try to resolve this without having a clear binding map like the &lt;br&gt;
one JavaScript forces you to create by how its module system works.&lt;/p&gt;
&lt;p&gt;Composer doesn't have to change, because modules might be autoloadable. &lt;br&gt;
Whatever the solution found: if it's a bidirectional relationship (meaning &lt;br&gt;
any included file contains information on the &amp;quot;package&amp;quot; it's in, guiding to &lt;br&gt;
the entrypoint) or with a config file (like with an INI file), it can be &lt;br&gt;
built-in, and Composer would be compatible as long as loaded structures are &lt;br&gt;
public and not internal to the module.&lt;/p&gt;
&lt;p&gt;This is the Container thread - I changed the subject line on my previous &lt;br&gt;
reply although I did include (was: ) so that people could track I was &lt;br&gt;
forking.&lt;/p&gt;
&lt;p&gt;I don't have much to add beyond my previous post. I haven't heard from &lt;br&gt;
anyone with engine experience about the feasibility or difficulty of what I &lt;br&gt;
propose.  To review (for anyone just joining but missing the previous &lt;br&gt;
message)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The user signals to the engine they want to include a php file AND &lt;br&gt;
process it independent of the current execution environment. No shared user &lt;br&gt;
defined symbols or variables.&lt;/li&gt;
&lt;li&gt;That file returns an interface so that the calling thread can talk to &lt;br&gt;
the child.&lt;/li&gt;
&lt;li&gt;As the processes reside on different threads these calls will need to &lt;br&gt;
be asynchronous to be optimal, otherwise the caller will be in a blocked &lt;br&gt;
state while the child executes the called method. It can work without the &lt;br&gt;
PHP Async / Await RFC's conclusion, but it won't be in ideal form without &lt;br&gt;
it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Containers provide process isolation. Say I have a WordPress plugin that I &lt;br&gt;
want to use composer libraries with. Say, Guzzle.  I can write my own &lt;br&gt;
container interface without touching Guzzle's code exposing the parts of &lt;br&gt;
Guzzle I need for my plugin. Since WordPress has no current core composer &lt;br&gt;
support I would need to carry a loader in my distro to be ran on the &lt;br&gt;
install hook of the plugin, bringing in composer and letting it in turn &lt;br&gt;
pull the libraries that I need to use.  If someone later writes a plugin &lt;br&gt;
that uses an incompatible version of Guzzle that doesn't matter - even if &lt;br&gt;
they lazily load it into the main symbol table by not using a container. &lt;br&gt;
My plugin is isolated.&lt;/p&gt;
&lt;p&gt;That isolation comes at a price. Each plugin has an independent vendor &lt;br&gt;
directory with no way to resolve complete redundancy. At least not in &lt;br&gt;
WordPress, which has no current composer implementation in core (I'm on the &lt;br&gt;
wp trac in a thread discussing it though).&lt;/p&gt;
&lt;p&gt;There are open questions though that must be answered before this &lt;br&gt;
container idea is seriously explored. Most critical, can PHP be made to &lt;br&gt;
handle an object passing from one thread to another? That is, continuing &lt;br&gt;
from the example above, can a client instance from one GuzzleContainer &lt;br&gt;
coexist on the main thread with a client instance from a different &lt;br&gt;
container and referencing different code? Or will methods be unable to &lt;br&gt;
cross the barrier? What are the implications for the Reflection API and &lt;br&gt;
using it to examine an object that originated from another process thread &lt;br&gt;
referencing symbols that don't exist on the current thread?&lt;/p&gt;
&lt;p&gt;The idea of containers is simple to state - but the implications are &lt;br&gt;
profound and might be unworkable. I simply don't know enough about the PHP &lt;br&gt;
engine to know.&lt;/p&gt;
&lt;p&gt;This seems completely out of a &amp;quot;modules&amp;quot; scope to me: threading comes with &lt;br&gt;
a huge cost (like state interoperability, thread healthchecks, memory &lt;br&gt;
usage, and many other things), and this brings a lot of complexity that is &lt;br&gt;
not needed yet IMO. If someone wants to &amp;quot;sandbox&amp;quot; PHP somehow, it's already &lt;br&gt;
possible to execute another PHP script from inside a PHP script via CLI, &lt;br&gt;
and passing arguments to it, but there's no back-and-forth communication, &lt;br&gt;
only a &amp;quot;request-response-like&amp;quot; system.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;However complex threading is, the complexity of aliasing is going to be &lt;br&gt;
higher. I've walked down this thought experiment several times in the last &lt;br&gt;
4 years. Threading isn't easy, but the work is in progress by Edmond HT - &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/true_async" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/true_async&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Containers, as I'm proposing them, rest on the foundation of this already &lt;br&gt;
in progress RFC which in turn builds on ReactPHP, AMPHP, Swoole and others.&lt;/p&gt;
</description><guid>CAEUnE0c_nAU9NRHxnBkyYqCfgMB4Ynx8EOBO5-FH7Lw30CssPw@mail.gmail.com</guid><pubDate>Tue, 16 Jun 2026 15:22:06 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131324</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;While this RFC works alongside the pattern matching proposal by Larry and Ilija, neither requires the other. The two are unrelated for several reasons.&lt;/p&gt;
&lt;p&gt;So to answer your question, no, I am not looking for pattern matching. I see these as two distinct features that address different needs within the language.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don't believe they are addressing entirely different needs. I believe the feature that static analysis tools support is pattern matching more than it is typing. The question for me becomes whether patterns be represented through types, or whether they should be matched against values.&lt;/p&gt;
&lt;p&gt;Strictly denoting types and validating patterns are two separate concerns. One asks &amp;quot;What can I do with this?&amp;quot; while the other asks &amp;quot;Is this within expected bounds?&amp;quot;. I am personally not against validating patterns within type declarations, as is supported in Typescript, Scala (I believe), and to an extent PHP with false|true. But I do believe they are different concerns.&lt;/p&gt;
&lt;p&gt;I also think that, this being a form of pattern matching, if approved would set a direction for the pattern matching RFC to treat patterns more closely as types than assertions and guards (as their RFC currently proposes). I am again not saying this is a bad thing, but it is worth acknowledging.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Sarina,&lt;/p&gt;
&lt;p&gt;I don't think we disagree here. I already said above that I think &lt;br&gt;
pattern matching should match against types with variable binding; this &lt;br&gt;
actually makes pattern matching easier because to expand it, you just &lt;br&gt;
have to expand the type system, and patterns get expanded for free.&lt;/p&gt;
&lt;p&gt;However, I think this is a discussion for the pattern matching RFC, not &lt;br&gt;
for the literal types RFC.&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Seifeddine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is interesting.  We've approached patterns as a coincidental superset of the type system.  That is, (almost) any type declaration is a valid pattern, but not because patterns are types; because we've implemented patterns to mirror types.&lt;/p&gt;
&lt;p&gt;Patterns &lt;em&gt;as&lt;/em&gt; types would be a completely different approach.  I can see the appeal, but there's a number of issues there:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Performance.  Patterns do a lot more work than a type check right now.  If patterns cropped up in function signatures all over the place, that would have a notable, though currently unclear and hard to predict, impact on performance.  (Far more inconsistent than, say, reified generics would have...)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Complexity.  Expanding the type system to full patterns seems like it would be... hard.  And possibly internal-API breaking.  I could be completely wrong here, but it sounds like a fairly drastic change.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Repeatability.  For this to work, I think it would &lt;em&gt;have&lt;/em&gt; to include type definitions, which have always hit a discussion wall in the past as no one can agree on their design.  Something like:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;type positiveInt =  int &amp;amp; &amp;gt;0; &lt;br&gt;
type UserId = int; &lt;br&gt;
type order = 'asc'|'desc';&lt;/p&gt;
&lt;p&gt;function foo(positiveInt $val) { ... } // Guaranteed to be an integer greater than 0&lt;/p&gt;
&lt;p&gt;function bar(UserId $id) { ... } // Would this accept a positiveInt?  Debatable.&lt;/p&gt;
&lt;p&gt;There's a sizable rabbit hole here.  One could argue even that for scalar literal types we should have proper type defs.&lt;/p&gt;
&lt;ol start="4"&gt;
&lt;li&gt;Variable binding.  Let me be clear: Variable binding &lt;em&gt;is&lt;/em&gt; the feature that makes pattern matching worthwhile.  It's the reason we started working on it; we believe it is a prerequisite for properly implementing ADTs/&amp;quot;tagged enums.&amp;quot;  So even if patterns become types, there will still be a need for an extended variable binding syntax that works only inline, not as part of a type declaration.  What the complexity impact of that would be, I have no idea.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If there is a consensus to go down this rabbit hole, I am not opposed to it.  But it's a very deep rabbit hole, and exploring it would guarantee that neither patterns nor scalar literal types make it into this version.  It would probably also entail 3-4 RFCs total, all of which would be kind of half-arsed on their own because they're part of a set; and PHP has been extremely, &lt;em&gt;extremely&lt;/em&gt; bad at coordinating and working with that in the past.  (Maybe a place for working groups?)&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>f5f73b9a-b31c-4971-8563-386295fcb793@app.fastmail.com</guid><pubDate>Tue, 16 Jun 2026 15:16:34 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131323</link><description>&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;The friction is real and a small targeted addition is worth &lt;br&gt;
shipping. (what the RFC proposes)&lt;/li&gt;
&lt;li&gt;The friction is real but the mechanism is wrong. (in which case: &lt;br&gt;
what signal would you prefer? per-file declare, magic first line, &lt;br&gt;
SAPI-only, ...)&lt;/li&gt;
&lt;li&gt;The friction is not real, or not worth a language change at all.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;I also am in camp 3.  I basically never type &amp;lt;?php myself.  My IDE does it for me when I create a file.  This is a non-issue, and the proposed solution, as others have explained, has many issues and gotchas.&lt;/p&gt;
&lt;p&gt;One useful part of Alex's module proposal was a file type that had stricter rules about what it could do; basically it had to follow PSR-1.  I think there could be potential in that concept, but it wouldn't be triggered by a different file name; it would be triggered by, say, &amp;lt;?phpo (PHP Only), or some other prefix that indicates the whole file must be code, no ?&amp;gt; allowed, cannot have top-level output or code, etc.  The idea needs some development, but I could see that having use in a way that doesn't break BC.&lt;/p&gt;
&lt;p&gt;But pivoting off the file name is a non-starter.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>8f1e69eb-a132-47aa-a158-4a5d0ad8ef2e@app.fastmail.com</guid><pubDate>Tue, 16 Jun 2026 14:53:08 +0000</pubDate></item><item><title>Containers. (was Re:  Two-step creation for PHP modules)</title><link>https://externals.io/message/131322</link><description>&lt;p&gt;Le 16/06/2026 à 06:45, Michael Morris a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;code&gt;Namespaces being just a globally accessible and define-able symbols
system is exactly why, so far, a PHP package cannot define &amp;quot;private
internal&amp;quot; code. The way the language works already allows
autoload-hijacking in order to override code from external libs,
or even
hack the visibility (like removing &amp;quot;final&amp;quot; or &amp;quot;private&amp;quot; keywords
before
autoloading the file...).
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;PHP has never kept people from shooting themselves in the foot. And in &lt;br&gt;
the past it's came with some big guns too (Register Globals in PHP 3 &lt;br&gt;
anyone?). Enforcing namespace visibility will come at a cost in &lt;br&gt;
performance, and it won't be enough to stop people from shooting &lt;br&gt;
themselves because PHP code is quite mutable. I don't see much of a &lt;br&gt;
point in trying to guide people's coding, especially in a language &lt;br&gt;
that doesn't have a set paradigm.  That is, in Java, you're using &lt;br&gt;
classes. In PHP you can approach things that way, but you write purely &lt;br&gt;
procedurally. You can use the language as it was originally conceived&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a templating language.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;I think it's morally good to bring new features to the core that &lt;br&gt;
disallow someone from shooting themselves in the foot. Readonly classes, &lt;br&gt;
property hooks, etc., are methods for maintainers to be able to stricten &lt;br&gt;
their code so that end users don't shoot themselves in the foot. Yet we &lt;br&gt;
have the Reflection API that permits a huge lot of things, and combining &lt;br&gt;
with autoload hacking or bounded closures, it means that all these &lt;br&gt;
requirements, strictening tools, etc., are &lt;em&gt;contracts&lt;/em&gt; we sign with &lt;br&gt;
maintainers. If someone uses any hacky tool built in PHP to override its &lt;br&gt;
native behavior, it's at their own risk. But the language allows it.&lt;/p&gt;
&lt;p&gt;With my suggestion for modules, having all structures being declared &lt;br&gt;
globally but with a prefix still allows someone to hack into it. It just &lt;br&gt;
lowers the pressure on how it's developed in the core, in order for it &lt;br&gt;
to be both simple to use, but also simpler to implement. Doesn't prevent &lt;br&gt;
feet shots, but has a big warning sign nonetheless.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When you say modules, what are talking about, because multiple &lt;br&gt;
languages implement &amp;quot;modules&amp;quot; in different ways. JavaScript is the &lt;br&gt;
most well known, but Go also has modules and they are quite different &lt;br&gt;
and support versioning out of the box. In each of these examples there &lt;br&gt;
is a requirement that the programmer write code to import the modules &lt;br&gt;
at some place either in the project (Go) or in every bloody file in &lt;br&gt;
the project (JavaScript). PHP doesn't require this, instead &lt;br&gt;
autoloading symbol definitions as they are encountered.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There are different terms available for the things we talk about, so as &lt;br&gt;
a reminder to the two/three people reading this message:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Module = file, similar to JS. This implies that everything defined &lt;br&gt;
in the file is private, unless &amp;quot;publicly exposed&amp;quot;, either via a &lt;br&gt;
&amp;quot;public&amp;quot; keyword (as Larry suggests in his modules-brainstorming &lt;br&gt;
document), or an &amp;quot;export&amp;quot; statement (similar to JS/TS).&lt;/li&gt;
&lt;li&gt;Module = package, in that case, this means that a module is composed &lt;br&gt;
of several files, but a module/package needs an entrypoint to define &lt;br&gt;
its components. Larry's aforementioned idea is about using an INI &lt;br&gt;
file as entrypoint that prevents double-loading of a list of files, &lt;br&gt;
but this could be implemented with other methods: my proposal for &lt;br&gt;
&amp;quot;module = file&amp;quot; could add a &amp;quot;package&amp;quot; system without a need for an &lt;br&gt;
INI file, and based purely on the list of publicly available &lt;br&gt;
structures from the main imported file, but implies a bidirectional &lt;br&gt;
relationship between the &amp;quot;main package file&amp;quot; (aka &amp;quot;entrypoint&amp;quot;) and &lt;br&gt;
the &amp;quot;package-included-only file&amp;quot;. It's just a different approach.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of these approaches removes namespaces, and considering my first &lt;br&gt;
idea and re-thinking it after all the comments in here, I think focusing &lt;br&gt;
on &amp;quot;using namespaces for that&amp;quot; is definitely the best approach. My &lt;br&gt;
proposal still stands, it just needs an update to better use namespaces &lt;br&gt;
for that need.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;NPM (not Node, node is the engine not the package/dependency manager) &lt;br&gt;
does this using aliases. PHP doesn't have a way to alias symbols at &lt;br&gt;
compile time. It would be nice if it did - I've suggested it as a &lt;br&gt;
parameter to include not knowing at the time of the suggestion that &lt;br&gt;
include isn't a function, it's a statement, so &lt;code&gt;include &amp;quot;file.php&amp;quot;&lt;/code&gt; is &lt;br&gt;
the same as &lt;code&gt;include(&amp;quot;file.php&amp;quot;)&lt;/code&gt;. Setting that aside, PHP projects &lt;br&gt;
rarely execute the include themselves - they let an autoloader handle &lt;br&gt;
it, so the autoloader must know which version to load. This isn't &lt;br&gt;
something that even NPM does - it just aliases and makes both &lt;br&gt;
libraries available. The caller still must specify which library is &lt;br&gt;
being pulled in.&lt;/p&gt;
&lt;p&gt;Node modules have a single point of entry, defined in the package.json &lt;br&gt;
file but usually index.js. In most Node packages this index.js imports &lt;br&gt;
all the public parts of the package and immediately exports them. &lt;br&gt;
Further, an import in node is an object (as is everything in &lt;br&gt;
JavaScript) that corresponds to that file.  Hence&lt;/p&gt;
&lt;p&gt;import { foo, bar } from 'MyPackage';&lt;/p&gt;
&lt;p&gt;This is using JavaScripts dereference mechanic to pluck members of an &lt;br&gt;
object into the current symbol table.  I could go on, but I think it's &lt;br&gt;
more on topic to just say that Node's import/export mechanic, elegant &lt;br&gt;
as it looks, is highly bound to JavaScript's scope rules and  how its &lt;br&gt;
symbol table works.  These aren't compatible with PHP.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'm a bit familiar with Node.js's import model. PHP could be partly &lt;br&gt;
compatible with this in the future, but complete scoped encapsulation of &lt;br&gt;
a single PHP file is too much of a paradigm change for PHP itself. My &lt;br&gt;
proposal is making this &amp;quot;private&amp;quot; by prepending a null character and &lt;br&gt;
hash to all &amp;quot;included modules&amp;quot; whatever their kind, so that it &lt;br&gt;
/feels/ private, but still behaves similarly to how PHP currently works. &lt;br&gt;
Less maintenance for the core team, zero BC break (purely additive and &lt;br&gt;
opt-in), can be transparent for the end-user (and &lt;em&gt;is&lt;/em&gt; transparent for &lt;br&gt;
transient dependencies), still overridable and hackable by developers. &lt;br&gt;
Some of the reasons why PHP became famous in the first place.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For one, PHP has two symbol tables - one for variables (which is why &lt;br&gt;
all variables start with $ ) and one for everything else. Variables &lt;br&gt;
are affected by function scope, nothing else is. For example, if you &lt;br&gt;
define a function within a function in JavaScript that function will &lt;br&gt;
be private to the function it is defined in - it can't be seen in &lt;br&gt;
other scopes. In PHP the function will be visible on the symbol table.&lt;/p&gt;
&lt;p&gt;For another, Node gives each file its own module scope. To move a &lt;br&gt;
symbol from one file to another you should use export and import. This &lt;br&gt;
creates a clear chain of custody for objects and symbols, but by God &lt;br&gt;
it also creates a LOT of boilerplate that the PHP community has no &lt;br&gt;
interest in replicating.&lt;/p&gt;
&lt;p&gt;Without the chain of custody you rapidly run into trouble. It doesn't &lt;br&gt;
matter if you try to allow the user to put a prefix on the namespace &lt;br&gt;
as I once suggested, or have PHP's engine prefix it automagically &lt;br&gt;
somehow - you still need to correctly disambiguate every blasted &lt;br&gt;
reference to that namespace. This is no easy task - take a look at the &lt;br&gt;
code of Strauss - &lt;a href="https://github.com/BrianHenryIE/strauss" rel="nofollow" target="_blank"&gt;https://github.com/BrianHenryIE/strauss&lt;/a&gt; That project &lt;br&gt;
allows you to rewrite a package with a new namespace, in effect doing &lt;br&gt;
it in userland. But as a precaution it prefixes every single package &lt;br&gt;
imported and severs the tie back to the original packagist.  Strauss &lt;br&gt;
is used by several WordPress plugins to make composer library use &lt;br&gt;
possible while still remaining portable between WordPress sites.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Interesting, and auto-prefixing namespaces for module=packages systems &lt;br&gt;
is IMO the easiest way to implement this without breaking the compiler &lt;br&gt;
nor the engine. It keeps everything as-is, and visually provides all &lt;br&gt;
that's needed for a &amp;quot;modules/packages&amp;quot; system to work: encapsulated &lt;br&gt;
private structures, an explicit public API, and the ability to load the &lt;br&gt;
same structures in the same namespaces because they are internally &lt;br&gt;
hidden with a hash, similarly to anonymous classes.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;code&gt;The only drawback of having modules like that would be that final
dependency trees in Composer would be non-flat, but again, I think
this
non-flat system should be opt-in. Similarly to how flat systems are
opt-in in the Node.js ecosystem (and trust me, I've tried to enforce
&amp;quot;flat&amp;quot; dependencies resolutions in certain Node projects, and it's a
huge hassle). Luckily, the PHP ecosystem is quite fine so far,
compared
to Node, and I would definitely keep the &amp;quot;flat&amp;quot; system in Composer
for
as long as possible, and make non-flat resolutions only case-specific
(which is rare, and usually framework-dependent, like with Wordpress
plugins for instance).
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I don't think it's a reasonable ask of Composer or any other &lt;br&gt;
dependency manager to try to resolve this without having a clear &lt;br&gt;
binding map like the one JavaScript forces you to create by how its &lt;br&gt;
module system works.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Composer doesn't have to change, because modules might be autoloadable. &lt;br&gt;
Whatever the solution found: if it's a bidirectional relationship &lt;br&gt;
(meaning any included file contains information on the &amp;quot;package&amp;quot; it's &lt;br&gt;
in, guiding to the entrypoint) or with a config file (like with an INI &lt;br&gt;
file), it can be built-in, and Composer would be compatible as long as &lt;br&gt;
loaded structures are public and not internal to the module.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This is the Container thread - I changed the subject line on my &lt;br&gt;
previous reply although I did include (was: ) so that people could &lt;br&gt;
track I was forking.&lt;/p&gt;
&lt;p&gt;I don't have much to add beyond my previous post. I haven't heard from &lt;br&gt;
anyone with engine experience about the feasibility or difficulty of &lt;br&gt;
what I propose.  To review (for anyone just joining but missing the &lt;br&gt;
previous message)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The user signals to the engine they want to include a php file AND &lt;br&gt;
process it independent of the current execution environment. No shared &lt;br&gt;
user defined symbols or variables.&lt;/li&gt;
&lt;li&gt;That file returns an interface so that the calling thread can talk &lt;br&gt;
to the child.&lt;/li&gt;
&lt;li&gt;As the processes reside on different threads these calls will need &lt;br&gt;
to be asynchronous to be optimal, otherwise the caller will be in a &lt;br&gt;
blocked state while the child executes the called method. It can work &lt;br&gt;
without the PHP Async / Await RFC's conclusion, but it won't be in &lt;br&gt;
ideal form without it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Containers provide process isolation. Say I have a WordPress plugin &lt;br&gt;
that I want to use composer libraries with. Say, Guzzle.  I can write &lt;br&gt;
my own container interface without touching Guzzle's code exposing the &lt;br&gt;
parts of Guzzle I need for my plugin. Since WordPress has no current &lt;br&gt;
core composer support I would need to carry a loader in my distro to &lt;br&gt;
be ran on the install hook of the plugin, bringing in composer and &lt;br&gt;
letting it in turn pull the libraries that I need to use.  If someone &lt;br&gt;
later writes a plugin that uses an incompatible version of Guzzle that &lt;br&gt;
doesn't matter - even if they lazily load it into the main symbol &lt;br&gt;
table by not using a container.  My plugin is isolated.&lt;/p&gt;
&lt;p&gt;That isolation comes at a price. Each plugin has an independent vendor &lt;br&gt;
directory with no way to resolve complete redundancy. At least not in &lt;br&gt;
WordPress, which has no current composer implementation in core (I'm &lt;br&gt;
on the wp trac in a thread discussing it though).&lt;/p&gt;
&lt;p&gt;There are open questions though that must be answered before this &lt;br&gt;
container idea is seriously explored. Most critical, can PHP be made &lt;br&gt;
to handle an object passing from one thread to another? That is, &lt;br&gt;
continuing from the example above, can a client instance from one &lt;br&gt;
GuzzleContainer coexist on the main thread with a client instance from &lt;br&gt;
a different container and referencing different code? Or will methods &lt;br&gt;
be unable to cross the barrier? What are the implications for the &lt;br&gt;
Reflection API and using it to examine an object that originated from &lt;br&gt;
another process thread referencing symbols that don't exist on the &lt;br&gt;
current thread?&lt;/p&gt;
&lt;p&gt;The idea of containers is simple to state - but the implications are &lt;br&gt;
profound and might be unworkable. I simply don't know enough about the &lt;br&gt;
PHP engine to know.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This seems completely out of a &amp;quot;modules&amp;quot; scope to me: threading comes &lt;br&gt;
with a huge cost (like state interoperability, thread healthchecks, &lt;br&gt;
memory usage, and many other things), and this brings a lot of &lt;br&gt;
complexity that is not needed yet IMO. If someone wants to &amp;quot;sandbox&amp;quot; PHP &lt;br&gt;
somehow, it's already possible to execute another PHP script from inside &lt;br&gt;
a PHP script via CLI, and passing arguments to it, but there's no &lt;br&gt;
back-and-forth communication, only a &amp;quot;request-response-like&amp;quot; system.&lt;/p&gt;
</description><guid>befc343a-2254-4f64-a908-682ea9344679@gmail.com</guid><pubDate>Tue, 16 Jun 2026 14:29:06 +0000</pubDate></item><item><title>[RFC] Working Groups</title><link>https://externals.io/message/131321</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Anything that doesn't need special powers can more efficiently be &lt;br&gt;
organized without the overhead of the initial RFC, as can also be &lt;br&gt;
seen by The PHP Foundation planning to launch 6 “special interest &lt;br&gt;
groups” in the remainder of 2026 without needing to involve the PHP &lt;br&gt;
project:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://thephp.foundation/blog/2026/06/11/integrating-community-" rel="nofollow" target="_blank"&gt;https://thephp.foundation/blog/2026/06/11/integrating-community-&lt;/a&gt; &lt;br&gt;
feedback-into-foundation-strategy-part2/#community-special-interest- &lt;br&gt;
groups&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'm aware of the PHP Foundation special interest groups, and Elizabeth &lt;br&gt;
and I discussed them before I opened the Working Groups RFC for &lt;br&gt;
discussion. We agreed they do not cover the same ground as the Working &lt;br&gt;
Groups RFC. By design, the PHP Foundation SIGs have no operational or &lt;br&gt;
governance authority over the PHP Project. There can be cross- &lt;br&gt;
pollination and collaboration between the initiatives, but the SIGs &lt;br&gt;
are external, community-focused, interest groups, while PHP WGs are &lt;br&gt;
internal, PHP Project-focused, operational groups.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My 2cents in the form of questions (because I might have missed something):&lt;/p&gt;
&lt;p&gt;Since the PHPF's role is to support, help and discuss, then shouldn't &lt;br&gt;
PHPF operatives be excluded from voting on RFCs, whatever the involved &lt;br&gt;
WG? It would ensure that the PHP voters (aka &amp;quot;/The community that &lt;br&gt;
includes contributors and core team members/&amp;quot;) can take decisions &lt;br&gt;
without the PHPF being able to intervene if there's a disagreement &lt;br&gt;
between the two groups, I guess...?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This RFC does not impose any restrictions or limitations on the PHP &lt;br&gt;
Foundation or its contractors. They're welcome to create and participate &lt;br&gt;
in working groups, and I never want to exclude them from voting on RFCs. &lt;br&gt;
I'm not sure what problem that would solve.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;And similarly, shouldn't there be a mandatory consultation from the PHP &lt;br&gt;
community when the PHPF actually operates on something that impacts the &lt;br&gt;
community on non-RFC-mandatory-operations, like marketing, &lt;br&gt;
communication, etc.? I mean, if at some point the PHPF communicates on &lt;br&gt;
the web on something the PHP community would disagree with (concluded &lt;br&gt;
via a vote of whatever sort), shouldn't the PHPF, as a &amp;quot;consultative &lt;br&gt;
agency&amp;quot;, have to update their acts and productions to fit to the &lt;br&gt;
community's views? (that would solve parts of the issues with the recent &lt;br&gt;
hot discussions on a certain link to a certain platform on PHP's &lt;br&gt;
website, for example).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This question doesn't seem related to the Working Groups RFC. The PHP &lt;br&gt;
Foundation is transparent about its role, and they are making efforts to &lt;br&gt;
be more transparent. As for the recent discussion about linking to &lt;br&gt;
X/Twitter, that had nothing to do with the foundation at all, so I'm not &lt;br&gt;
sure how you're making this connection.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;All these questions are here because PHP has no official governance &lt;br&gt;
other than the (sometimes vaguely) designated &amp;quot;PHP Community&amp;quot;, and the &lt;br&gt;
PHPF's role, from what I understand, is mostly to &lt;em&gt;help the community to &lt;br&gt;
decide and act&lt;/em&gt; on PHP-related tasks, but &lt;em&gt;not directly decide nor act&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I might be off of some details, so feel free to correct me if I miss &lt;br&gt;
something, if I'm mistaking, or if I misunderstand certain roles or &lt;br&gt;
notions.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The Working Groups RFC is in no shape, way, or form an attempt to &lt;br&gt;
control how the PHP Foundation operates within the PHP community. I have &lt;br&gt;
zero problems with how they operate as an entity, and I trust their &lt;br&gt;
leadership.&lt;/p&gt;
&lt;p&gt;The WGs RFC exists to provide some (albeit loose) governance structure &lt;br&gt;
to the PHP Project without entirely up-ending the status quo.&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Ben&lt;/p&gt;
</description><guid>20260616134018.E3C5D1A00BD@lists.php.net</guid><pubDate>Tue, 16 Jun 2026 13:40:18 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131320</link><description>&lt;blockquote&gt;
&lt;p&gt;Following the pre-RFC discussion from late May [1], I'm moving the &lt;br&gt;
&amp;quot;pure-code source files&amp;quot; proposal into formal RFC stage as&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/optional_php_tags" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/optional_php_tags&lt;/a&gt; &amp;lt;&lt;a href="https://wiki.php.net/rfc/" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/&lt;/a&gt; &lt;br&gt;
optional_php_tags&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The single core motivation is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Most new PHP files written today are pure code – framework classes, &lt;br&gt;
autoloaded library code, console commands, configuration files, route &lt;br&gt;
definitions. For these files the '&amp;lt;?php' opener carries no semantic &lt;br&gt;
information; it is a vestige of PHP's templating heritage that every &lt;br&gt;
file must repeat. PHP is the only modern mainstream language in which &lt;br&gt;
this prefix is mandatory.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To which my response is &amp;quot;and that is a bad thing ... how?&amp;quot;&lt;/p&gt;
&lt;p&gt;On the subject of ceremonial boilerplate ... Maybe it's changed in the &lt;br&gt;
years since I had to work with it, but Perl modules had to end with &amp;quot;1;&amp;quot; &lt;br&gt;
because they were evaluated as they were imported, and the whole module &lt;br&gt;
had to return a truthy value to indicate that it had successfully &lt;br&gt;
loaded. (Of course, any truthy value would work and '1' was merely &lt;br&gt;
convention - TMTOWTDI.)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The mechanism is a single new opt-in file extension, .phpc, whose &lt;br&gt;
semantics are: the file is parsed as pure PHP. The lexer enters &lt;br&gt;
ST_IN_SCRIPTING on the first byte; no opening &amp;lt;?php is required. &lt;br&gt;
A leading UTF-8 BOM and a CLI shebang are silently skipped. The &lt;br&gt;
classic .php extension and every other code-loading path are &lt;br&gt;
completely untouched - the change is strictly additive.&lt;/p&gt;
&lt;p&gt;Reference implementation: PR against php/php-src (link in the RFC). &lt;br&gt;
Patch is ~50 lines of straight-line C in &lt;br&gt;
Zend/zend_language_scanner.l::open_file_for_scanning, plus 15 new &lt;br&gt;
.phpt tests in Zend/tests/phpc/. Full regression run against Zend/, &lt;br&gt;
ext/tokenizer/, ext/standard/, ext/spl/, ext/reflection/, ext/phar/ &lt;br&gt;
(9836 tests): 0 failures, 0 modifications to any pre-existing test.&lt;/p&gt;
&lt;p&gt;Pre-RFC feedback, addressed in the RFC document:&lt;/p&gt;
&lt;p&gt; - Ben Ramsey on engine-vs-SAPI dispatch: &lt;br&gt;
   own section explaining why include/require/Phar all live below &lt;br&gt;
   SAPI and need engine-level handling. Ben's -p/stdin idea is &lt;br&gt;
   adopted as Future Scope (a sister RFC after this one).&lt;/p&gt;
&lt;p&gt; - Alex Rock on alternatives (env var, include_pure keyword, &lt;br&gt;
   declare(pure=1)): each rebutted individually under &amp;quot;Rejected &lt;br&gt;
   Alternatives&amp;quot;.&lt;/p&gt;
&lt;p&gt; - Bruce Weirdan on BC of the .phpc extension itself: own &lt;br&gt;
   paragraph in the BC section, honest about the fact that I have &lt;br&gt;
   NOT scanned public corpora; asking voters with private-codebase &lt;br&gt;
   visibility for data points during Discussion.&lt;/p&gt;
&lt;p&gt; - .pyc visual collision and scattered prior .phpc usage: &lt;br&gt;
   addressed via a sub-vote on the extension name (.phpc / .phpp / &lt;br&gt;
   .pcode / .phpx).&lt;/p&gt;
&lt;p&gt; - Security (source-code exposure via misconfigured webservers, &lt;br&gt;
   the historic .inc footgun): own section with mandatory &lt;br&gt;
   documentation commitments and canonical Apache/Nginx/Caddy/ &lt;br&gt;
   FrankenPHP snippets in Appendix A.&lt;/p&gt;
&lt;p&gt; - Boutell 2012 and Ohgaki 2014: own section distinguishing this &lt;br&gt;
   proposal mechanically from both.&lt;/p&gt;
&lt;p&gt;Discussion period: at least two weeks from today. Looking forward &lt;br&gt;
to feedback, especially on:&lt;/p&gt;
&lt;p&gt; - The Open Issues block in the RFC (extension name, real-world &lt;br&gt;
   .phpc-in-use data, case-sensitivity on Windows/macOS). &lt;br&gt;
 - Anything in the Phar / OPcache surface I should test more &lt;br&gt;
   thoroughly before voting opens. &lt;br&gt;
 - Whether the Security section's commitments are strong enough.&lt;/p&gt;
&lt;p&gt;Thanks for reading, &lt;br&gt;
Hendrik Mennen&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="https://news-web.php.net/php.internals/131024" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/131024&lt;/a&gt; &amp;lt;&lt;a href="https://news" rel="nofollow" target="_blank"&gt;https://news&lt;/a&gt;- &lt;br&gt;
&lt;a href="http://web.php.net/php.internals/131024" rel="nofollow" target="_blank"&gt;web.php.net/php.internals/131024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>5c14c34d-6e07-46e1-a646-295927c41732@varteg.nz</guid><pubDate>Tue, 16 Jun 2026 12:51:44 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131319</link><description>&lt;p&gt;Le 16/06/2026 à 07:00, Hendrik Mennen a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Strictly additive &lt;br&gt;
Sure thing, but it's not allowing any kind of BC, since &lt;br&gt;
including &amp;quot;.phpc&amp;quot; files from older PHP versions would be &lt;br&gt;
possible, and would be rendered as text instead of being &lt;br&gt;
compiled...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt; - A library shipping .phpc files declares the target version &lt;br&gt;
   in composer.json: &lt;br&gt;
     &amp;quot;require&amp;quot;: { &amp;quot;php&amp;quot;: &amp;quot;&amp;gt;=8.6&amp;quot; } &lt;br&gt;
 - composer install fails at install time with a clear &lt;br&gt;
   PHP-version error on lower versions. The .phpc file never &lt;br&gt;
   reaches a running interpreter that doesn't understand it. &lt;br&gt;
 - Library authors who want to support older PHP versions &lt;br&gt;
   don't ship .phpc files. Same constraint as readonly &lt;br&gt;
   classes, property hooks, enums, etc. &lt;br&gt;
 - For non-Composer distribution (manual clone, raw .zip), &lt;br&gt;
   the user is on their own - same as for any 8.x feature.&lt;/p&gt;
&lt;p&gt;For application code (where the deployed PHP version is known) &lt;br&gt;
the FC constraint is moot. For shared libraries it is real and &lt;br&gt;
worth flagging in the RFC. I will add a Forward Compatibility &lt;br&gt;
subsection covering this.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This list is a big reason to not implement your proposal: since it &lt;br&gt;
breaks BC for everyone upgrading to the newer PHP version, it's putting &lt;br&gt;
a huge burden to the entire ecosystem just to avoid disclosing PHP code &lt;br&gt;
as text instead of parsing/compiling it. &lt;br&gt;
(and side-note: it also forces potential users of &amp;quot;.phpc&amp;quot; extension to &lt;br&gt;
change their code, though I doubt anyone is using this extension, and &lt;br&gt;
checking Github isn't enough for that, considering the millions of &lt;br&gt;
worldwide projects using PHP). &lt;br&gt;
All that makes the RFC absolutely non-additive: you do not /add/ a &lt;br&gt;
feature to the language, you are /changing/ how it behaves internally, &lt;br&gt;
from not caring about file ext to making a big opinionated choice on one &lt;br&gt;
particular extension name.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Reduced ceremony / First-class CLI scripts / Clearer file-mode &lt;br&gt;
intent&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;These largely overlap with Kamil's earlier points; I'd rather &lt;br&gt;
not re-litigate the same arguments inline. The Motivation &lt;br&gt;
section is being rewritten this week to drop the four-bullet &lt;br&gt;
framing entirely in favour of one honest sentence (&amp;quot;modern PHP &lt;br&gt;
is overwhelmingly pure-code; &amp;lt;?php is a vestige for those files; &lt;br&gt;
.phpc is the smallest mechanism to remove it opt-in&amp;quot;) plus a &lt;br&gt;
&amp;quot;what this RFC does NOT claim&amp;quot; subsection. If after that you &lt;br&gt;
still see no value, that is a fair (3).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don't think adding a file extension constraint adds any value to PHP. &lt;br&gt;
Any file using &amp;quot;&amp;lt;?php&amp;quot; is just five characters at the beginning and all &lt;br&gt;
works. Implementing this RFC would imply too much change on the language &lt;br&gt;
and the ecosystem, just to avoid writing these five characters. That's &lt;br&gt;
way too overkill.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Closing-tag-echo issue, having &amp;quot;?&amp;gt;&amp;quot; somewhere...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To clarify: this RFC does NOT try to solve that. ?&amp;gt; behaviour &lt;br&gt;
inside a .phpc file is byte-for-byte identical to .php - drop- &lt;br&gt;
out to inline mode is preserved, __halt_compiler() works, &amp;lt;?= &lt;br&gt;
has no special meaning. The &amp;quot;What is unchanged&amp;quot; subsection of &lt;br&gt;
the RFC says this; I will make it more prominent.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Noted&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;All existing ecosystem would have to adapt: Composer, IDEs, &lt;br&gt;
web servers...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Concede partially. Adoption work is non-zero. The RFC's &lt;br&gt;
position:&lt;/p&gt;
&lt;p&gt; - Composer: PSR-4 autoloader already accepts a per-rule &lt;br&gt;
   extension list; adding .phpc is documentation + a small &lt;br&gt;
   Composer-side acknowledgement. RFC commits to opening &lt;br&gt;
   that PR pre-landing. &lt;br&gt;
 - IDEs / static analysers: configure file modes by extension &lt;br&gt;
   via their per-project config; one-line change per tool. &lt;br&gt;
   RFC commits to opening tracking issues on day of vote &lt;br&gt;
   acceptance. &lt;br&gt;
 - Web servers: explicit handler mapping or deny. Appendix A &lt;br&gt;
   of the RFC ships canonical snippets for Apache, Nginx, &lt;br&gt;
   Caddy, FrankenPHP.&lt;/p&gt;
&lt;p&gt;You are right that adoption would be slow. I do not think &lt;br&gt;
that disqualifies an additive opt-in feature, but I respect &lt;br&gt;
that you do.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It's not about respecting what I do, or making the adoption quick, it's &lt;br&gt;
about the relevance and impact of it.&lt;/p&gt;
&lt;p&gt;Your RFC enforces a change in all the three elements on this list: &lt;br&gt;
package managers, IDEs and web servers.&lt;/p&gt;
&lt;p&gt;I think you already know that 80% of worldwide websites and apps are &lt;br&gt;
using PHP.&lt;/p&gt;
&lt;p&gt;You can &lt;em&gt;not&lt;/em&gt; expect some hosting providers to advertise support for a &lt;br&gt;
new PHP version if that version implies that they must update their &lt;br&gt;
entire HTTP configuration on all their servers, VMs and so on, even if &lt;br&gt;
it's a &amp;quot;one-liner&amp;quot; in your mind. I've been there on a small scale, &lt;br&gt;
updating one machine that served dozens of domain names, and trust me, &lt;br&gt;
it comes with a cost, and I'm a really smaller-cases user. Now scale &lt;br&gt;
this to the worldwide web. It's just not rational at all.&lt;/p&gt;
&lt;p&gt;This RFC not only enforces a &amp;quot;config change&amp;quot;, it enforces lots of &lt;br&gt;
companies to actually PAY for forward-compatibility before even &lt;br&gt;
upgrading PHP.&lt;/p&gt;
&lt;p&gt;In almost all its time, PHP's strength have been its ease to deploy and &lt;br&gt;
configure, and here you're making deployment and configuration more &lt;br&gt;
complex for the sake of removing five characters at the beginning of a &lt;br&gt;
file. That's just too much.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Templating system based on PHP files [...] many such projects&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed, and .phpc proposes to harm none of them. It is opt-in &lt;br&gt;
by filename. Template engines (compiled .php cache files &lt;br&gt;
prefixed with &amp;lt;?php) are untouched; hand-written .phtml &lt;br&gt;
templates are untouched; a legacy codebase that never adopts &lt;br&gt;
.phpc loses nothing.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On the template part, /maybe/ a legacy codebase loses nothing. Maybe.&lt;/p&gt;
&lt;p&gt;But all other arguments still stand.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Definition files (that I suggested in another internals &lt;br&gt;
thread) [...] but even having &amp;quot;?&amp;gt;&amp;quot; from inside a function is &lt;br&gt;
no issue&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have not read your Definition files thread yet; pointer &lt;br&gt;
welcome. If that concept subsumes .phpc as a special case of &lt;br&gt;
something broader, I would rather refine the bigger idea than &lt;br&gt;
ship a smaller one that conflicts with it. Genuinely &lt;br&gt;
interested.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You can read the thread there: &lt;a href="https://externals.io/message/131171" rel="nofollow" target="_blank"&gt;https://externals.io/message/131171&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It's on the internals mailing-list, feel free to check it out.&lt;/p&gt;
</description><guid>b204a714-bfc9-4bec-b484-10f9157d58ef@gmail.com</guid><pubDate>Tue, 16 Jun 2026 09:58:13 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131318</link><description>&lt;p&gt;Le 16/06/2026 à 10:47, Hendrik Mennen a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Adding meaning to a specific extension is a BC break when no &lt;br&gt;
extensions have meaning prior. &lt;br&gt;
Mostly conceded, with one nuance: .phar already carries &lt;br&gt;
filename-aware semantics in the engine (the phar:// stream &lt;br&gt;
wrapper resolves entries against the .phar filename, and the &lt;br&gt;
archive opens differently from a regular file). It is not a &lt;br&gt;
clean precedent for &amp;quot;extension drives lexer mode at file-open &lt;br&gt;
time&amp;quot;, but PHP does not have //zero// precedent for filenames &lt;br&gt;
mattering to the engine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Wong: the &amp;quot;.phar&amp;quot; extension is just a reminder. A PHAR file is &amp;quot;just&amp;quot; a &lt;br&gt;
PHP file that contains the &amp;quot;__HALT_COMPILER(); ?&amp;gt;&amp;quot; statement that tells &lt;br&gt;
the engine and extension &amp;quot;where&amp;quot; to look to decompress the archive into &lt;br&gt;
code, with an internal filesystem covered under the &amp;quot;phar://&amp;quot; stream.&lt;/p&gt;
&lt;p&gt;Any PHAR file could use any extension, and &amp;quot;.phar&amp;quot; is just indicative. &lt;br&gt;
It runs natively with PHP without needing an extension to be considered &lt;br&gt;
as an archive.&lt;/p&gt;
&lt;p&gt;I'm also camp-3, I think this feature doesn't add anything to PHP, and &lt;br&gt;
breaks BC by introducing file extension as a constraint for conditional &lt;br&gt;
parsing methods.&lt;/p&gt;
</description><guid>a6a4d771-44e9-4fd5-b9a0-ec88c53aa0da@gmail.com</guid><pubDate>Tue, 16 Jun 2026 09:44:01 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131317</link><description>&lt;blockquote&gt;
&lt;p&gt;Am 16.06.2026 um 09:26 schrieb Davey Shafik &lt;a href="mailto:me@daveyshafik.com"&gt;me@daveyshafik.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&amp;lt;snip&amp;gt;
&amp;gt; 
&amp;gt; If that friction is not worth solving, that is a legitimate position
&amp;gt; and I would rather hear that than dress the proposal up to look
&amp;gt; weightier than it is. Three honest paths from here, and I would find
&amp;gt; it useful if respondents could say which they are closest to:
&amp;gt; 
&amp;gt; 1. The friction is real and a small targeted addition is worth
&amp;gt;    shipping. (what the RFC proposes)
&amp;gt; 2. The friction is real but the mechanism is wrong. (in which case:
&amp;gt;    what signal would you prefer? per-file declare, magic first line,
&amp;gt;    SAPI-only, ...)
&amp;gt; 3. The friction is not real, or not worth a language change at all.
&lt;p&gt;I am strongly in camp 3; I see zero value in this.&lt;/p&gt;
&lt;p&gt;Adding meaning to a specific extension is a BC break when no extensions have meaning prior. In addition, it makes it difficult to identify the file type from the code alone if you're not familiar with it.&lt;/p&gt;
&lt;p&gt;There really isn't any friction here, any decent editor or IDE will give you a default file header with the open tag (at least). At worst they'll auto-complete after at most 2 characters.&lt;/p&gt;
&lt;p&gt;It's also important to note that other languages have explicit template files like Jinja or ERB, PHP does not have this and is itself essentially both the template language and the full programming language.&lt;/p&gt;
&lt;p&gt;Yes it's a legacy way of doing things like ASP classic or ColdFusion, but that doesn't make it wrong or bad.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Davey&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Davey,&lt;/p&gt;
&lt;p&gt;Thanks for the direct camp-3 position - the (1/2/3) framing was &lt;br&gt;
intended exactly to surface that kind of clarity, and a voter &lt;br&gt;
landing explicitly in 3 with substantive reasons is more useful &lt;br&gt;
to me than vague reservations would have been.&lt;/p&gt;
&lt;p&gt;I won't try to argue you out of camp 3 - your stance is &lt;br&gt;
well-formed and arguing past it would just escalate. A few &lt;br&gt;
responses point-by-point, primarily for other readers who are &lt;br&gt;
still forming a view.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Adding meaning to a specific extension is a BC break when no &lt;br&gt;
extensions have meaning prior.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Mostly conceded, with one nuance: .phar already carries &lt;br&gt;
filename-aware semantics in the engine (the phar:// stream &lt;br&gt;
wrapper resolves entries against the .phar filename, and the &lt;br&gt;
archive opens differently from a regular file). It is not a &lt;br&gt;
clean precedent for &amp;quot;extension drives lexer mode at file-open &lt;br&gt;
time&amp;quot;, but PHP does not have //zero// precedent for filenames &lt;br&gt;
mattering to the engine.&lt;/p&gt;
&lt;p&gt;You are right that this RFC would be the first to make filename &lt;br&gt;
drive lexer state. That is a categorical shift even if no &lt;br&gt;
existing code's behaviour changes. The RFC was leaning too hard &lt;br&gt;
on &amp;quot;strictly additive&amp;quot; framing; I have added an explicit &amp;quot;this &lt;br&gt;
is a categorical precedent shift&amp;quot; entry to the &amp;quot;What this RFC &lt;br&gt;
does NOT claim&amp;quot; section in v0.4 (just published, see Changelog).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It makes it difficult to identify the file type from the code &lt;br&gt;
alone if you're not familiar with it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Conceded as a real cost. The &amp;lt;?php opener is a portable &amp;quot;this &lt;br&gt;
is PHP&amp;quot; marker that travels with code into Stack Overflow &lt;br&gt;
answers, blog posts, diff views, IDEs that hide extensions. A &lt;br&gt;
naked .phpc snippet loses that signal until the reader has &lt;br&gt;
learned what .phpc means. Also added as an explicit downside in &lt;br&gt;
the v0.4 &amp;quot;does NOT claim&amp;quot; section.&lt;/p&gt;
&lt;p&gt;The flip side (most snippets already drop &amp;lt;?php in practice &lt;br&gt;
because the surrounding context is clear) softens the cost but &lt;br&gt;
does not erase it. Reasonable to weigh it at &amp;quot;small but real&amp;quot;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There really isn't any friction here, any decent editor or IDE &lt;br&gt;
will give you a default file header with the open tag&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed; the typing cost is microscopic. The RFC has tried to &lt;br&gt;
say this honestly (&amp;quot;not a big ergonomic win&amp;quot; was already in &lt;br&gt;
the Motivation section). What remains is the //read// cost: the &lt;br&gt;
visual noise of &amp;lt;?php on every file you open. You can reasonably &lt;br&gt;
value that at zero, especially if your IDE renders the opener &lt;br&gt;
in a muted colour or folds it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Other languages have explicit template files like Jinja or &lt;br&gt;
ERB, PHP does not have this and is itself essentially both the &lt;br&gt;
template language and the full programming language. [...] Yes &lt;br&gt;
it's a legacy way of doing things like ASP classic or &lt;br&gt;
ColdFusion, but that doesn't make it wrong or bad.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed - PHP's template-and-programming-language duality is a &lt;br&gt;
real and ongoing identity, defended even by people who never &lt;br&gt;
write inline templates themselves. .phpc does not change that: &lt;br&gt;
.php files continue to support full templating, mixed mode, &lt;br&gt;
short tags, ?&amp;gt;, the lot. .phpc is an opt-in for files where the &lt;br&gt;
author has decided &amp;quot;this is code, no template behaviour wanted&amp;quot;.&lt;/p&gt;
&lt;p&gt;On the legacy framing: those languages died for many reasons, &lt;br&gt;
but &amp;quot;you could use them as a template engine&amp;quot; was not one. PHP's &lt;br&gt;
longevity is partly because of that duality, not in spite of it. &lt;br&gt;
I would not pitch .phpc as &amp;quot;removing the legacy&amp;quot; - it is purely &lt;br&gt;
adding a way for individual files to opt out of inheriting it.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;If you have time, one clarifying question that would help shape &lt;br&gt;
the rest of the discussion:&lt;/p&gt;
&lt;p&gt;Is your camp-3 stance disqualifying the specific mechanism &lt;br&gt;
(.phpc-extension dispatch), or disqualifying the broader concept &lt;br&gt;
of &amp;quot;let me write a PHP file without &amp;lt;?php&amp;quot; regardless of &lt;br&gt;
mechanism? Camp 3 on the mechanism is actionable for future &lt;br&gt;
iteration; camp 3 on the concept is information that tells me &lt;br&gt;
to stop spending the Discussion's air time on this.&lt;/p&gt;
&lt;p&gt;Either answer is useful to know.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Hendrik&lt;/p&gt;
</description><guid>6FCBBCCC-F6DC-4613-90E4-6106120CB932@gmail.com</guid><pubDate>Tue, 16 Jun 2026 08:47:07 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131316</link><description>&lt;blockquote&gt;
&lt;/blockquote&gt;
&amp;lt;snip&amp;gt;
&amp;gt; 
&amp;gt; If that friction is not worth solving, that is a legitimate position
&amp;gt; and I would rather hear that than dress the proposal up to look
&amp;gt; weightier than it is. Three honest paths from here, and I would find
&amp;gt; it useful if respondents could say which they are closest to:
&amp;gt; 
&amp;gt;  1. The friction is real and a small targeted addition is worth
&amp;gt;     shipping. (what the RFC proposes)
&amp;gt;  2. The friction is real but the mechanism is wrong. (in which case:
&amp;gt;     what signal would you prefer? per-file declare, magic first line,
&amp;gt;     SAPI-only, ...)
&amp;gt;  3. The friction is not real, or not worth a language change at all.
&lt;p&gt;I am strongly in camp 3; I see zero value in this.&lt;/p&gt;
&lt;p&gt;Adding meaning to a specific extension is a BC break when no extensions have meaning prior. In addition, it makes it difficult to identify the file type from the code alone if you're not familiar with it.&lt;/p&gt;
&lt;p&gt;There really isn't any friction here, any decent editor or IDE will give you a default file header with the open tag (at least). At worst they'll auto-complete after at most 2 characters.&lt;/p&gt;
&lt;p&gt;It's also important to note that other languages have explicit template files like Jinja or ERB, PHP does not have this and is itself essentially both the template language and the full programming language.&lt;/p&gt;
&lt;p&gt;Yes it's a legacy way of doing things like ASP classic or ColdFusion, but that doesn't make it wrong or bad.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Davey&lt;/li&gt;
&lt;/ul&gt;
</description><guid>19D44705-8161-4B27-85F9-448726C634AB@daveyshafik.com</guid><pubDate>Tue, 16 Jun 2026 07:26:34 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131315</link><description>&lt;blockquote&gt;
&lt;p&gt;Am 16.06.2026 um 06:52 schrieb Michael Morris &lt;a href="mailto:tendoaki@gmail.com"&gt;tendoaki@gmail.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Am 15.06.2026 um 10:43 schrieb Kamil Tekiela &amp;&lt;a href="mailto:lt;tekiela246@gmail.com" rel="nofollow" target="_blank"&gt;lt;tekiela246@gmail.com&lt;/a&gt; &lt;a href="mailto:tekiela246@gmail.com"&gt;mailto:tekiela246@gmail.com&lt;/a&gt;&amp;gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;Following the pre-RFC discussion from late May [1], I'm moving the &lt;br&gt;
&amp;quot;pure-code source files&amp;quot; proposal into formal RFC stage as&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/optional_php_tags" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/optional_php_tags&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The mechanism is a single new opt-in file extension, .phpc, whose &lt;br&gt;
semantics are: the file is parsed as pure PHP. The lexer enters &lt;br&gt;
ST_IN_SCRIPTING on the first byte; no opening &amp;lt;?php is required. &lt;br&gt;
A leading UTF-8 BOM and a CLI shebang are silently skipped. The &lt;br&gt;
classic .php extension and every other code-loading path are &lt;br&gt;
completely untouched - the change is strictly additive.&lt;/p&gt;
&lt;p&gt;Reference implementation: PR against php/php-src (link in the RFC). &lt;br&gt;
Patch is ~50 lines of straight-line C in &lt;br&gt;
Zend/zend_language_scanner.l::open_file_for_scanning, plus 15 new &lt;br&gt;
.phpt tests in Zend/tests/phpc/. Full regression run against Zend/, &lt;br&gt;
ext/tokenizer/, ext/standard/, ext/spl/, ext/reflection/, ext/phar/ &lt;br&gt;
(9836 tests): 0 failures, 0 modifications to any pre-existing test.&lt;/p&gt;
&lt;p&gt;Pre-RFC feedback, addressed in the RFC document:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Ben Ramsey on engine-vs-SAPI dispatch: &lt;br&gt;
own section explaining why include/require/Phar all live below &lt;br&gt;
SAPI and need engine-level handling. Ben's -p/stdin idea is &lt;br&gt;
adopted as Future Scope (a sister RFC after this one).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Alex Rock on alternatives (env var, include_pure keyword, &lt;br&gt;
declare(pure=1)): each rebutted individually under &amp;quot;Rejected &lt;br&gt;
Alternatives&amp;quot;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bruce Weirdan on BC of the .phpc extension itself: own &lt;br&gt;
paragraph in the BC section, honest about the fact that I have &lt;br&gt;
NOT scanned public corpora; asking voters with private-codebase &lt;br&gt;
visibility for data points during Discussion.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;.pyc visual collision and scattered prior .phpc usage: &lt;br&gt;
addressed via a sub-vote on the extension name (.phpc / .phpp / &lt;br&gt;
.pcode / .phpx).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Security (source-code exposure via misconfigured webservers, &lt;br&gt;
the historic .inc footgun): own section with mandatory &lt;br&gt;
documentation commitments and canonical Apache/Nginx/Caddy/ &lt;br&gt;
FrankenPHP snippets in Appendix A.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Boutell 2012 and Ohgaki 2014: own section distinguishing this &lt;br&gt;
proposal mechanically from both.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Discussion period: at least two weeks from today. Looking forward &lt;br&gt;
to feedback, especially on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Open Issues block in the RFC (extension name, real-world &lt;br&gt;
.phpc-in-use data, case-sensitivity on Windows/macOS).&lt;/li&gt;
&lt;li&gt;Anything in the Phar / OPcache surface I should test more &lt;br&gt;
thoroughly before voting opens.&lt;/li&gt;
&lt;li&gt;Whether the Security section's commitments are strong enough.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks for reading, &lt;br&gt;
Hendrik Mennen&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="https://news-web.php.net/php.internals/131024" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/131024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I tried to catch up on this discussion last night. I see a lot of things that could go wrong with this, but I don't see a clear motivation for why would we want this change.&lt;/p&gt;
&lt;p&gt;Reduced ceremony in pure-code files.&lt;br /&gt;
This is a moot point because after the change you still have the ceremony of adding .phpc to every file. Just unnecessary churn.&lt;/p&gt;
&lt;p&gt;First-class CLI scripts.&lt;br /&gt;
Is this really a big concern? Is it going to work better? Are there things you cannot do today because of it?&lt;/p&gt;
&lt;p&gt;Clearer file-mode intent.&lt;br /&gt;
We already have that. By convention many people add .php extension to pure PHP files, and .phtml to templates. It's not mandated by a language and people are free to choose their naming conventions.&lt;/p&gt;
&lt;p&gt;Strictly additive.&lt;br /&gt;
That's not entirely true, but that's beside the point. Why is this one of the main motivations? We don't add things just because we can. They need to have a purpose.&lt;/p&gt;
&lt;p&gt;We already have a good way of writing pure PHP code files. Just add 5 characters at the beginning of the file &amp;lt;?php and the rest of the file will be treated as PHP source code.&lt;/p&gt;
&lt;p&gt;I would also like to echo what others said that PHP source code doesn't have to be within &amp;lt;?php. A text file will be compiled and interpreted by PHP as a print statement. Even in pure PHP code files you may want to escape the PHP context with ?&amp;gt;. Mandating that a file with a certain extension will have these restrictions is worse than having to start every file with &amp;lt;?PHP.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Kamil&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Kamil,&lt;/p&gt;
&lt;p&gt;Thanks for the substantive pushback - these are exactly the right &lt;br&gt;
questions, and you're correct on more of them than the RFC as currently &lt;br&gt;
worded admits.&lt;/p&gt;
&lt;p&gt;Conceding upfront: &amp;quot;strictly additive&amp;quot; is a necessary property, not a &lt;br&gt;
motivation. I leaned on it too much. Same for the three weaker arguments &lt;br&gt;
(CLI ergonomics, convention clarity, ceremony shift) - none of them &lt;br&gt;
alone justifies the mechanism.&lt;/p&gt;
&lt;p&gt;The honest single-sentence motivation:&lt;/p&gt;
&lt;p&gt;Most new PHP files written today are pure code (framework classes, &lt;br&gt;
autoloaders, console commands, configuration). For those files the &lt;br&gt;
&amp;lt;?php opener carries zero semantic information. PHP is the only &lt;br&gt;
modern mainstream language where it is mandatory.&lt;/p&gt;
&lt;p&gt;If that friction is not worth solving, that is a legitimate position &lt;br&gt;
and I would rather hear that than dress the proposal up to look &lt;br&gt;
weightier than it is. Three honest paths from here, and I would find &lt;br&gt;
it useful if respondents could say which they are closest to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The friction is real and a small targeted addition is worth &lt;br&gt;
shipping. (what the RFC proposes)&lt;/li&gt;
&lt;li&gt;The friction is real but the mechanism is wrong. (in which case: &lt;br&gt;
what signal would you prefer? per-file declare, magic first line, &lt;br&gt;
SAPI-only, ...)&lt;/li&gt;
&lt;li&gt;The friction is not real, or not worth a language change at all.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That is a sharper question than re-litigating each motivation in turn, &lt;br&gt;
and the answer determines whether to refine, pivot, or withdraw before &lt;br&gt;
voting.&lt;/p&gt;
&lt;p&gt;On your last point - that .phpc &amp;quot;restricts&amp;quot; PHP's text-as-print &lt;br&gt;
feature - I think we agree more than disagree. .phpc would not change &lt;br&gt;
.php behaviour at all. It is opt-in by filename. Authors who want the &lt;br&gt;
templating shape keep using .php, ?&amp;gt; drop-out continues to work inside &lt;br&gt;
.phpc, and the engine on existing files is byte-for-byte identical. &lt;br&gt;
The &amp;quot;restriction&amp;quot; you describe (no top-of-file inline content; &lt;br&gt;
&amp;lt;?php-as-tag rejected inside .phpc) is intentional - it is what makes &lt;br&gt;
the mode meaningful for the cases that opt in.&lt;/p&gt;
&lt;p&gt;I will update the RFC's Motivation section to reflect this &lt;br&gt;
clarification in the next day or two so the rest of the Discussion &lt;br&gt;
runs on the stronger framing rather than the weaker one I shipped &lt;br&gt;
with.&lt;/p&gt;
&lt;p&gt;Thanks again, &lt;br&gt;
Hendrik&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don't get a vote, but mark me as opposed. If we ever do this, it needs to accompany something akin to JavaScript's strict mode which shards off several long standing warts that can't otherwise be gotten rid of because of BC. If we ever do a strict mode we'd better get it right and do it only once.&lt;/p&gt;
&lt;p&gt;As it stands, there just isn't anything here other than lifting the need to type 5 characters at the start of every file. Worse, it could be closing a door we'll never see again.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Michael,&lt;/p&gt;
&lt;p&gt;Thanks - registered as opposed, conditional on &amp;quot;not bundled with &lt;br&gt;
something larger&amp;quot;. That conditional is a useful distinction.&lt;/p&gt;
&lt;p&gt;The &amp;quot;you're closing the door on a bigger one-shot opportunity&amp;quot; &lt;br&gt;
framing is worth answering directly. Two reasons I don't think it &lt;br&gt;
holds:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;.phpc and a hypothetical JS-strict-mode-style language cleanup &lt;br&gt;
are best designed as orthogonal axes, not bundled. Strict mode &lt;br&gt;
naturally lives in declare() or an attribute - both work inside &lt;br&gt;
.php AND .phpc. Coupling &amp;quot;pure code&amp;quot; with &amp;quot;strict mode&amp;quot; would &lt;br&gt;
force every .phpc adopter into strict mode whether they want it &lt;br&gt;
or not, which is a much bigger ask than &amp;quot;opt into either &lt;br&gt;
independently&amp;quot;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;PHP already has per-file opt-ins that landed individually - &lt;br&gt;
declare(strict_types=1), declare(ticks=1), readonly classes, &lt;br&gt;
enums, property hooks. None of them consumed &amp;quot;the one-shot &lt;br&gt;
file-mode slot&amp;quot; because there isn't one. .phpc adds one more &lt;br&gt;
opt-in along a different axis; it does not consume design space &lt;br&gt;
a future strict mode would need.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Bundling would make BOTH proposals harder, not easier. Strict mode &lt;br&gt;
is contentious by design (every behaviour change has defenders) and &lt;br&gt;
would extend Discussion and Voting by months or years. Removing the &lt;br&gt;
opener does not have to wait on that.&lt;/p&gt;
&lt;p&gt;If you have concrete ideas about what a PHP strict mode should &lt;br&gt;
contain - which warts, which behaviours, which design - I would be &lt;br&gt;
genuinely interested, separate from this RFC. That is a conversation &lt;br&gt;
worth having on its own merits, in its own thread.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Hendrik&lt;/p&gt;
</description><guid>6F5B473E-3A12-476A-ADDE-1B8B61D8D83A@gmail.com</guid><pubDate>Tue, 16 Jun 2026 05:04:23 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131314</link><description>&lt;blockquote&gt;
&lt;p&gt;Am 15.06.2026 um 12:16 schrieb Alex Rock &lt;a href="mailto:pierstoval@gmail.com"&gt;pierstoval@gmail.com&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;Le 15/06/2026 à 10:03, Hendrik Mennen a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;Following the pre-RFC discussion from late May [1], I'm moving the &lt;br&gt;
&amp;quot;pure-code source files&amp;quot; proposal into formal RFC stage as&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/optional_php_tags" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/optional_php_tags&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The mechanism is a single new opt-in file extension, .phpc, whose &lt;br&gt;
semantics are: the file is parsed as pure PHP. The lexer enters &lt;br&gt;
ST_IN_SCRIPTING on the first byte; no opening &amp;lt;?php is required. &lt;br&gt;
A leading UTF-8 BOM and a CLI shebang are silently skipped. The &lt;br&gt;
classic .php extension and every other code-loading path are &lt;br&gt;
completely untouched - the change is strictly additive.&lt;/p&gt;
&lt;p&gt;Reference implementation: PR against php/php-src (link in the RFC). &lt;br&gt;
Patch is ~50 lines of straight-line C in &lt;br&gt;
Zend/zend_language_scanner.l::open_file_for_scanning, plus 15 new &lt;br&gt;
.phpt tests in Zend/tests/phpc/. Full regression run against Zend/, &lt;br&gt;
ext/tokenizer/, ext/standard/, ext/spl/, ext/reflection/, ext/phar/ &lt;br&gt;
(9836 tests): 0 failures, 0 modifications to any pre-existing test.&lt;/p&gt;
&lt;p&gt;Pre-RFC feedback, addressed in the RFC document:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Ben Ramsey on engine-vs-SAPI dispatch: &lt;br&gt;
own section explaining why include/require/Phar all live below &lt;br&gt;
SAPI and need engine-level handling. Ben's -p/stdin idea is &lt;br&gt;
adopted as Future Scope (a sister RFC after this one).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Alex Rock on alternatives (env var, include_pure keyword, &lt;br&gt;
declare(pure=1)): each rebutted individually under &amp;quot;Rejected &lt;br&gt;
Alternatives&amp;quot;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bruce Weirdan on BC of the .phpc extension itself: own &lt;br&gt;
paragraph in the BC section, honest about the fact that I have &lt;br&gt;
NOT scanned public corpora; asking voters with private-codebase &lt;br&gt;
visibility for data points during Discussion.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;.pyc visual collision and scattered prior .phpc usage: &lt;br&gt;
addressed via a sub-vote on the extension name (.phpc / .phpp / &lt;br&gt;
.pcode / .phpx).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Security (source-code exposure via misconfigured webservers, &lt;br&gt;
the historic .inc footgun): own section with mandatory &lt;br&gt;
documentation commitments and canonical Apache/Nginx/Caddy/ &lt;br&gt;
FrankenPHP snippets in Appendix A.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Boutell 2012 and Ohgaki 2014: own section distinguishing this &lt;br&gt;
proposal mechanically from both.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Discussion period: at least two weeks from today. Looking forward &lt;br&gt;
to feedback, especially on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Open Issues block in the RFC (extension name, real-world &lt;br&gt;
.phpc-in-use data, case-sensitivity on Windows/macOS).&lt;/li&gt;
&lt;li&gt;Anything in the Phar / OPcache surface I should test more &lt;br&gt;
thoroughly before voting opens.&lt;/li&gt;
&lt;li&gt;Whether the Security section's commitments are strong enough.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks for reading, &lt;br&gt;
Hendrik Mennen&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="https://news-web.php.net/php.internals/131024" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/131024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I still disagree with this proposal, though I have no power anywhere, because IMO it doesn't bring lots of benefits compared to the issues it creates.&lt;/p&gt;
&lt;p&gt;Side-note: the proposals I made about potential alternatives to include such files were only based on the &amp;quot;What if we still do this, but in another way?&amp;quot; motto. The bottom thought is that I disagree with the feature, but if it had to be done somehow, these suggestions are about how I would have done this, mostly to ensure better (IMO) BC and DX, nothing fancy or professional, just my random internet person's opinion :)&lt;/p&gt;
&lt;p&gt;About the motivations, here are my comments:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Reduced ceremony in pure-code files&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As you say: modern PHP code is already pure-PHP, and having to prepend &amp;quot;&amp;lt;?php&amp;quot; everywhere doesn't seem to be an issue for maintainers. I don't see why removing &amp;quot;&amp;lt;?php&amp;quot; would add any value.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;First-class CLI scripts&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You can already use shebang lines on PHP scripts and PHAR files, because what's after the shebang line is sent to the environment-based script that is requested from said shebang line. It's basically doing &amp;quot;env php {script file}&amp;quot; , therefore is already compatible with any shebang-line-compatible shell. Having a &amp;quot;&amp;lt;?php&amp;quot; just means it's PHP code. Having pure-PHP code without the opening tag wouldn't change a thing.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Clearer file-mode intent&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It's not clearer, it's just moving the intent to the file extension rather than the file content itself. It's a really big DX change. &lt;br&gt;
If I wanted a pure-PHP file with another extension, I could do it today by adding &amp;quot;&amp;lt;?php&amp;quot; in the file and it would be interpreted as PHP code without issues. &lt;br&gt;
Here, the proposal is about allowing to shift a 30-plus-years-old working habit with PHP with something that is currently not intuitive neither expected. Adoption would definitely be complicated for lots of people, and if it's opt-in and doesn't bring lots of value, I'm not sure that many people would do it anyway.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Strictly additive&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sure thing, but it's not allowing any kind of BC, since including &amp;quot;.phpc&amp;quot; files from older PHP versions would be possible, and would be rendered as text instead of being compiled... This has a big impact on the ecosystem. &lt;br&gt;
And by the way, about the ecosystem, here's my last comment on the motivations that definitely makes this proposal really hard to accept, at least for me: all existing ecosystem would have to adapt: Composer, IDEs, web servers, and so on. So it would be additive, indeed, but adoption would be extremely slow.&lt;/p&gt;
&lt;p&gt;To me, one of the issues you are partially trying to fix is the potential closing-tag-echo issue, having &amp;quot;?&amp;gt;&amp;quot; somewhere indicating that PHP will echo something during the process. This issue can be solved with &amp;quot;Definition files&amp;quot; (that I suggested in another internals thread as a first-step towards Modules), but even having &amp;quot;?&amp;gt;&amp;quot; from inside a function is no issue: it just exposes a clear intent of &amp;quot;echo-ing something&amp;quot;, and isn't really different than &amp;quot;echo &amp;lt;&amp;lt;&amp;lt;HTML &amp;quot; followed by a bunch of HTML for instance. IDEs may behave a bit differently with syntax highlighting, but modern IDEs are capable of injecting languages properly depending on lots of contextual metadata (and the &amp;quot;&amp;lt;&amp;lt;&amp;lt;HTML&amp;quot;  heredoc syntax isn't random: IDEs can know that code inside this context is HTML). Your proposal would enforce using &amp;quot;echo&amp;quot; manually, while the &amp;quot;?&amp;gt;&amp;quot; syntax defines the same thing. &lt;br&gt;
This system would also be useless for template systems based on PHP files, which are used in many legacy PHP projects for, well, legacy reasons ; I could tell you about many such projects I've been working on in the past 5 years only, and I'm one single person, so extrapolate this to worldwide devs, and you get more people that wouldn't care at all about pure-php files because it's useless to their stack.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Alex,&lt;/p&gt;
&lt;p&gt;Thanks for the detailed reply, and for the explicit &amp;quot;I still &lt;br&gt;
disagree&amp;quot; - useful signal, and in the (1/2/3) framing from the &lt;br&gt;
Kamil sub-thread you are at (3), which is exactly the kind of &lt;br&gt;
direct answer I asked for. Even without voting power your &lt;br&gt;
arguments will be read by voters, so engaging substantively.&lt;/p&gt;
&lt;p&gt;The genuinely new concern in your reply that the RFC does not &lt;br&gt;
yet address head-on is forward-compatibility. Taking that first.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Strictly additive &lt;br&gt;
Sure thing, but it's not allowing any kind of BC, since &lt;br&gt;
including &amp;quot;.phpc&amp;quot; files from older PHP versions would be &lt;br&gt;
possible, and would be rendered as text instead of being &lt;br&gt;
compiled...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You are correct. On PHP &amp;lt; target-version, a .phpc file pulled &lt;br&gt;
in via require/include would be parsed by the existing lexer &lt;br&gt;
in INITIAL state and emitted as inline content. This is the &lt;br&gt;
standard 8.x adoption story in shape (a readonly class on 8.1 &lt;br&gt;
is a syntax error; a .phpc file on 8.5 is text emission), but &lt;br&gt;
&amp;quot;text emission&amp;quot; is a worse failure mode than &amp;quot;syntax error&amp;quot; &lt;br&gt;
because it can silently expose source code in a web context.&lt;/p&gt;
&lt;p&gt;The realistic mitigation, which the RFC should make explicit &lt;br&gt;
(and will, in the next revision):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A library shipping .phpc files declares the target version &lt;br&gt;
in composer.json: &lt;br&gt;
&amp;quot;require&amp;quot;: { &amp;quot;php&amp;quot;: &amp;quot;&amp;gt;=8.6&amp;quot; }&lt;/li&gt;
&lt;li&gt;composer install fails at install time with a clear &lt;br&gt;
PHP-version error on lower versions. The .phpc file never &lt;br&gt;
reaches a running interpreter that doesn't understand it.&lt;/li&gt;
&lt;li&gt;Library authors who want to support older PHP versions &lt;br&gt;
don't ship .phpc files. Same constraint as readonly &lt;br&gt;
classes, property hooks, enums, etc.&lt;/li&gt;
&lt;li&gt;For non-Composer distribution (manual clone, raw .zip), &lt;br&gt;
the user is on their own - same as for any 8.x feature.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For application code (where the deployed PHP version is known) &lt;br&gt;
the FC constraint is moot. For shared libraries it is real and &lt;br&gt;
worth flagging in the RFC. I will add a Forward Compatibility &lt;br&gt;
subsection covering this.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Reduced ceremony / First-class CLI scripts / Clearer file-mode &lt;br&gt;
intent&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;These largely overlap with Kamil's earlier points; I'd rather &lt;br&gt;
not re-litigate the same arguments inline. The Motivation &lt;br&gt;
section is being rewritten this week to drop the four-bullet &lt;br&gt;
framing entirely in favour of one honest sentence (&amp;quot;modern PHP &lt;br&gt;
is overwhelmingly pure-code; &amp;lt;?php is a vestige for those files; &lt;br&gt;
.phpc is the smallest mechanism to remove it opt-in&amp;quot;) plus a &lt;br&gt;
&amp;quot;what this RFC does NOT claim&amp;quot; subsection. If after that you &lt;br&gt;
still see no value, that is a fair (3).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Closing-tag-echo issue, having &amp;quot;?&amp;gt;&amp;quot; somewhere...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To clarify: this RFC does NOT try to solve that. ?&amp;gt; behaviour &lt;br&gt;
inside a .phpc file is byte-for-byte identical to .php - drop- &lt;br&gt;
out to inline mode is preserved, __halt_compiler() works, &amp;lt;?= &lt;br&gt;
has no special meaning. The &amp;quot;What is unchanged&amp;quot; subsection of &lt;br&gt;
the RFC says this; I will make it more prominent.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;All existing ecosystem would have to adapt: Composer, IDEs, &lt;br&gt;
web servers...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Concede partially. Adoption work is non-zero. The RFC's &lt;br&gt;
position:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Composer: PSR-4 autoloader already accepts a per-rule &lt;br&gt;
extension list; adding .phpc is documentation + a small &lt;br&gt;
Composer-side acknowledgement. RFC commits to opening &lt;br&gt;
that PR pre-landing.&lt;/li&gt;
&lt;li&gt;IDEs / static analysers: configure file modes by extension &lt;br&gt;
via their per-project config; one-line change per tool. &lt;br&gt;
RFC commits to opening tracking issues on day of vote &lt;br&gt;
acceptance.&lt;/li&gt;
&lt;li&gt;Web servers: explicit handler mapping or deny. Appendix A &lt;br&gt;
of the RFC ships canonical snippets for Apache, Nginx, &lt;br&gt;
Caddy, FrankenPHP.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You are right that adoption would be slow. I do not think &lt;br&gt;
that disqualifies an additive opt-in feature, but I respect &lt;br&gt;
that you do.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Templating system based on PHP files [...] many such projects&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Agreed, and .phpc proposes to harm none of them. It is opt-in &lt;br&gt;
by filename. Template engines (compiled .php cache files &lt;br&gt;
prefixed with &amp;lt;?php) are untouched; hand-written .phtml &lt;br&gt;
templates are untouched; a legacy codebase that never adopts &lt;br&gt;
.phpc loses nothing.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Definition files (that I suggested in another internals &lt;br&gt;
thread) [...] but even having &amp;quot;?&amp;gt;&amp;quot; from inside a function is &lt;br&gt;
no issue&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have not read your Definition files thread yet; pointer &lt;br&gt;
welcome. If that concept subsumes .phpc as a special case of &lt;br&gt;
something broader, I would rather refine the bigger idea than &lt;br&gt;
ship a smaller one that conflicts with it. Genuinely &lt;br&gt;
interested.&lt;/p&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Hendrik&lt;/p&gt;
</description><guid>8E53677F-B231-4A61-AAA7-88233364F23A@gmail.com</guid><pubDate>Tue, 16 Jun 2026 05:00:02 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131313</link><description>&lt;blockquote&gt;
&lt;p&gt;Am 15.06.2026 um 10:43 schrieb Kamil Tekiela &lt;a href="mailto:tekiela246@gmail.com"&gt;tekiela246@gmail.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;Following the pre-RFC discussion from late May [1], I'm moving the &lt;br&gt;
&amp;quot;pure-code source files&amp;quot; proposal into formal RFC stage as&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/optional_php_tags" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/optional_php_tags&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The mechanism is a single new opt-in file extension, .phpc, whose &lt;br&gt;
semantics are: the file is parsed as pure PHP. The lexer enters &lt;br&gt;
ST_IN_SCRIPTING on the first byte; no opening &amp;lt;?php is required. &lt;br&gt;
A leading UTF-8 BOM and a CLI shebang are silently skipped. The &lt;br&gt;
classic .php extension and every other code-loading path are &lt;br&gt;
completely untouched - the change is strictly additive.&lt;/p&gt;
&lt;p&gt;Reference implementation: PR against php/php-src (link in the RFC). &lt;br&gt;
Patch is ~50 lines of straight-line C in &lt;br&gt;
Zend/zend_language_scanner.l::open_file_for_scanning, plus 15 new &lt;br&gt;
.phpt tests in Zend/tests/phpc/. Full regression run against Zend/, &lt;br&gt;
ext/tokenizer/, ext/standard/, ext/spl/, ext/reflection/, ext/phar/ &lt;br&gt;
(9836 tests): 0 failures, 0 modifications to any pre-existing test.&lt;/p&gt;
&lt;p&gt;Pre-RFC feedback, addressed in the RFC document:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Ben Ramsey on engine-vs-SAPI dispatch: &lt;br&gt;
own section explaining why include/require/Phar all live below &lt;br&gt;
SAPI and need engine-level handling. Ben's -p/stdin idea is &lt;br&gt;
adopted as Future Scope (a sister RFC after this one).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Alex Rock on alternatives (env var, include_pure keyword, &lt;br&gt;
declare(pure=1)): each rebutted individually under &amp;quot;Rejected &lt;br&gt;
Alternatives&amp;quot;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bruce Weirdan on BC of the .phpc extension itself: own &lt;br&gt;
paragraph in the BC section, honest about the fact that I have &lt;br&gt;
NOT scanned public corpora; asking voters with private-codebase &lt;br&gt;
visibility for data points during Discussion.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;.pyc visual collision and scattered prior .phpc usage: &lt;br&gt;
addressed via a sub-vote on the extension name (.phpc / .phpp / &lt;br&gt;
.pcode / .phpx).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Security (source-code exposure via misconfigured webservers, &lt;br&gt;
the historic .inc footgun): own section with mandatory &lt;br&gt;
documentation commitments and canonical Apache/Nginx/Caddy/ &lt;br&gt;
FrankenPHP snippets in Appendix A.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Boutell 2012 and Ohgaki 2014: own section distinguishing this &lt;br&gt;
proposal mechanically from both.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Discussion period: at least two weeks from today. Looking forward &lt;br&gt;
to feedback, especially on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Open Issues block in the RFC (extension name, real-world &lt;br&gt;
.phpc-in-use data, case-sensitivity on Windows/macOS).&lt;/li&gt;
&lt;li&gt;Anything in the Phar / OPcache surface I should test more &lt;br&gt;
thoroughly before voting opens.&lt;/li&gt;
&lt;li&gt;Whether the Security section's commitments are strong enough.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks for reading, &lt;br&gt;
Hendrik Mennen&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="https://news-web.php.net/php.internals/131024" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/131024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I tried to catch up on this discussion last night. I see a lot of things &lt;br&gt;
that could go wrong with this, but I don't see a clear motivation for why &lt;br&gt;
would we want this change.&lt;/p&gt;
&lt;p&gt;Reduced ceremony in pure-code files. &lt;br&gt;
This is a moot point because after the change you still have the ceremony &lt;br&gt;
of adding .phpc to every file. Just unnecessary churn.&lt;/p&gt;
&lt;p&gt;First-class CLI scripts. &lt;br&gt;
Is this really a big concern? Is it going to work better? Are there things &lt;br&gt;
you cannot do today because of it?&lt;/p&gt;
&lt;p&gt;Clearer file-mode intent. &lt;br&gt;
We already have that. By convention many people add .php extension to pure &lt;br&gt;
PHP files, and .phtml to templates. It's not mandated by a language and &lt;br&gt;
people are free to choose their naming conventions.&lt;/p&gt;
&lt;p&gt;Strictly additive. &lt;br&gt;
That's not entirely true, but that's beside the point. Why is this one of &lt;br&gt;
the main motivations? We don't add things just because we can. They need to &lt;br&gt;
have a purpose.&lt;/p&gt;
&lt;p&gt;We already have a good way of writing pure PHP code files. Just add 5 &lt;br&gt;
characters at the beginning of the file &amp;lt;?php and the rest of the file will &lt;br&gt;
be treated as PHP source code.&lt;/p&gt;
&lt;p&gt;I would also like to echo what others said that PHP source code doesn't &lt;br&gt;
have to be within &amp;lt;?php. A text file will be compiled and interpreted by &lt;br&gt;
PHP as a print statement. Even in pure PHP code files you may want to &lt;br&gt;
escape the PHP context with ?&amp;gt;. Mandating that a file with a certain &lt;br&gt;
extension will have these restrictions is worse than having to start every &lt;br&gt;
file with &amp;lt;?PHP.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Kamil&lt;/p&gt;
&lt;p&gt;Hi Kamil,&lt;/p&gt;
&lt;p&gt;Thanks for the substantive pushback - these are exactly the right &lt;br&gt;
questions, and you're correct on more of them than the RFC as currently &lt;br&gt;
worded admits.&lt;/p&gt;
&lt;p&gt;Conceding upfront: &amp;quot;strictly additive&amp;quot; is a necessary property, not a &lt;br&gt;
motivation. I leaned on it too much. Same for the three weaker arguments &lt;br&gt;
(CLI ergonomics, convention clarity, ceremony shift) - none of them &lt;br&gt;
alone justifies the mechanism.&lt;/p&gt;
&lt;p&gt;The honest single-sentence motivation:&lt;/p&gt;
&lt;p&gt;Most new PHP files written today are pure code (framework classes, &lt;br&gt;
autoloaders, console commands, configuration). For those files the &lt;br&gt;
&amp;lt;?php opener carries zero semantic information. PHP is the only &lt;br&gt;
modern mainstream language where it is mandatory.&lt;/p&gt;
&lt;p&gt;If that friction is not worth solving, that is a legitimate position &lt;br&gt;
and I would rather hear that than dress the proposal up to look &lt;br&gt;
weightier than it is. Three honest paths from here, and I would find &lt;br&gt;
it useful if respondents could say which they are closest to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The friction is real and a small targeted addition is worth &lt;br&gt;
shipping. (what the RFC proposes)&lt;/li&gt;
&lt;li&gt;The friction is real but the mechanism is wrong. (in which case: &lt;br&gt;
what signal would you prefer? per-file declare, magic first line, &lt;br&gt;
SAPI-only, ...)&lt;/li&gt;
&lt;li&gt;The friction is not real, or not worth a language change at all.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That is a sharper question than re-litigating each motivation in turn, &lt;br&gt;
and the answer determines whether to refine, pivot, or withdraw before &lt;br&gt;
voting.&lt;/p&gt;
&lt;p&gt;On your last point - that .phpc &amp;quot;restricts&amp;quot; PHP's text-as-print &lt;br&gt;
feature - I think we agree more than disagree. .phpc would not change &lt;br&gt;
.php behaviour at all. It is opt-in by filename. Authors who want the &lt;br&gt;
templating shape keep using .php, ?&amp;gt; drop-out continues to work inside &lt;br&gt;
.phpc, and the engine on existing files is byte-for-byte identical. &lt;br&gt;
The &amp;quot;restriction&amp;quot; you describe (no top-of-file inline content; &lt;br&gt;
&amp;lt;?php-as-tag rejected inside .phpc) is intentional - it is what makes &lt;br&gt;
the mode meaningful for the cases that opt in.&lt;/p&gt;
&lt;p&gt;I will update the RFC's Motivation section to reflect this &lt;br&gt;
clarification in the next day or two so the rest of the Discussion &lt;br&gt;
runs on the stronger framing rather than the weaker one I shipped &lt;br&gt;
with.&lt;/p&gt;
&lt;p&gt;Thanks again, &lt;br&gt;
Hendrik&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don't get a vote, but mark me as opposed. If we ever do this, it needs to &lt;br&gt;
accompany something akin to JavaScript's strict mode which shards off &lt;br&gt;
several long standing warts that can't otherwise be gotten rid of because &lt;br&gt;
of BC. If we ever do a strict mode we'd better get it right and do it only &lt;br&gt;
once.&lt;/p&gt;
&lt;p&gt;As it stands, there just isn't anything here other than lifting the need to &lt;br&gt;
type 5 characters at the start of every file. Worse, it could be closing a &lt;br&gt;
door we'll never see again.&lt;/p&gt;
</description><guid>CAEUnE0cO_ti1BJZAPDsoiq98kDZyhQVPdVncRycc-HEai8im3g@mail.gmail.com</guid><pubDate>Tue, 16 Jun 2026 04:52:32 +0000</pubDate></item><item><title>Containers. (was Re:  Two-step creation for PHP modules)</title><link>https://externals.io/message/131312</link><description>&lt;blockquote&gt;
&lt;p&gt;Le 13/06/2026 à 19:14, Rowan Tommins [IMSoP] a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Namespaces in PHP are a bit of a hack - they prepend the stated &lt;br&gt;
namespace &lt;br&gt;
to all labels declared in the file, and the use statement allows the &lt;br&gt;
fully &lt;br&gt;
qualified name of a class, function or constant to be stated only once, &lt;br&gt;
usually at the head of the file. It also allows aliasing, say if you &lt;br&gt;
have a &lt;br&gt;
&amp;quot;Parser&amp;quot; class out of two different packages - you can alias them as &lt;br&gt;
&amp;quot;FooParser&amp;quot; and &amp;quot;BarParser&amp;quot;. It looks like Java or JavaScript importing, &lt;br&gt;
but it isn't. &lt;br&gt;
A small correction: this is exactly the same way that namespaces work in &lt;br&gt;
Java, with exactly the same implication: the fully qualified class name has &lt;br&gt;
to be globally unique. Java's solution to isolating an entire set of names &lt;br&gt;
is apparently to define an &amp;quot;Isolated ClassLoader&amp;quot;: &lt;br&gt;
&lt;a href="https://www.javathinking.com/blog/what-is-an-isolated-classloader-in-java/" rel="nofollow" target="_blank"&gt;https://www.javathinking.com/blog/what-is-an-isolated-classloader-in-java/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;C# also has this model of namespaces, but allows you to isolate a set of &lt;br&gt;
names from a particular &amp;quot;assembly&amp;quot; using an &amp;quot;extern alias&amp;quot; statement: &lt;br&gt;
&lt;a href="https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/extern-alias" rel="nofollow" target="_blank"&gt;https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/extern-alias&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I suspect both mechanisms rely on details of their respective runtimes &lt;br&gt;
that wouldn't translate to PHP, but in principle what we're looking for is &lt;br&gt;
something similar.&lt;/p&gt;
&lt;p&gt;Rowan Tommins &lt;br&gt;
[IMSoP]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Namespaces being just a globally accessible and define-able symbols &lt;br&gt;
system is exactly why, so far, a PHP package cannot define &amp;quot;private &lt;br&gt;
internal&amp;quot; code. The way the language works already allows &lt;br&gt;
autoload-hijacking in order to override code from external libs, or even &lt;br&gt;
hack the visibility (like removing &amp;quot;final&amp;quot; or &amp;quot;private&amp;quot; keywords before &lt;br&gt;
autoloading the file...).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;PHP has never kept people from shooting themselves in the foot. And in the &lt;br&gt;
past it's came with some big guns too (Register Globals in PHP 3 anyone?). &lt;br&gt;
Enforcing namespace visibility will come at a cost in performance, and it &lt;br&gt;
won't be enough to stop people from shooting themselves because PHP code is &lt;br&gt;
quite mutable. I don't see much of a point in trying to guide people's &lt;br&gt;
coding, especially in a language that doesn't have a set paradigm.  That &lt;br&gt;
is, in Java, you're using classes. In PHP you can approach things that way, &lt;br&gt;
but you write purely procedurally. You can use the language as it was &lt;br&gt;
originally conceived - a templating language.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;After 18 years of PHP coding, including 15 years as a professional, I've &lt;br&gt;
seen a huge lot of legacy PHP projects that benefit the language's &lt;br&gt;
flexibility. Sure thing many of businesses could succeed thanks to being &lt;br&gt;
able to override almost everything (contrary to stricter languages), but &lt;br&gt;
maintaining these codebases with up-to-date versions of PHP, or &lt;br&gt;
3rd-party libs, is so much of a hassle that, at some point, lots of &lt;br&gt;
maintainers are going more and more into adding new things into PHP that &lt;br&gt;
enforce a bit more strictness, opt-in of course. Some other libs (I'm &lt;br&gt;
thinking about EasyAdmin, in the Symfony ecosystem, for example) have &lt;br&gt;
even made the choice to close pretty much everything and provide &lt;br&gt;
&amp;quot;maintainable&amp;quot; public entrypoints, enforcing the Open/Close principle &lt;br&gt;
with a strict approach (immutable final classes, stricter options and &lt;br&gt;
arguments, etc.). It has its pros and cons, and can be frustrating for &lt;br&gt;
some devs, but the main goal was to make maintenance a bit easier for &lt;br&gt;
the core devs so that they are not forced to maintain BC on too many &lt;br&gt;
layers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Introducing Modules, whether they are based on namespaces or not, would &lt;br&gt;
help maintainers, I think, and could reinvent how we think of PHP &lt;br&gt;
packages, while still keeping PHP what it has always been because it &lt;br&gt;
would be opt-in for maintainers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When you say modules, what are talking about, because multiple languages &lt;br&gt;
implement &amp;quot;modules&amp;quot; in different ways. JavaScript is the most well known, &lt;br&gt;
but Go also has modules and they are quite different and support versioning &lt;br&gt;
out of the box. In each of these examples there is a requirement that the &lt;br&gt;
programmer write code to import the modules at some place either in the &lt;br&gt;
project (Go) or in every bloody file in the project (JavaScript). PHP &lt;br&gt;
doesn't require this, instead autoloading symbol definitions as they are &lt;br&gt;
encountered.&lt;/p&gt;
&lt;p&gt;Any package/module/whatchamacallit system used in PHP needs to build on &lt;br&gt;
this principle, not swim against it, if it is to have any hope of &lt;br&gt;
consideration on the list.&lt;/p&gt;
&lt;p&gt;Also, I think the following is important to point out - Composer is NOT a &lt;br&gt;
package manager.  It is a dependency manager. There's a subtle difference &lt;br&gt;
between the two.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On my side, I don't care if modules are tightly coupled to namespaces or &lt;br&gt;
not, and if more, that's even why my first idea was to bind a module to &lt;br&gt;
a single-file at first, and making all modules imported from such file &lt;br&gt;
being non-importable-again, thus creating a single module tree that can &lt;br&gt;
be stored at compile-time, have no side-effect at load-time (which is a &lt;br&gt;
big safeguard to avoid other issues), and allowing multiple modules of &lt;br&gt;
seemingly same name to be loaded in the memory at the same time, &lt;br&gt;
similarly to how Node.js allows having different versions of the same &lt;br&gt;
packages to be installed, while also allowing to have one version used &lt;br&gt;
by many modules too.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;NPM (not Node, node is the engine not the package/dependency manager) does &lt;br&gt;
this using aliases. PHP doesn't have a way to alias symbols at compile &lt;br&gt;
time. It would be nice if it did - I've suggested it as a parameter to &lt;br&gt;
include not knowing at the time of the suggestion that include isn't a &lt;br&gt;
function, it's a statement, so &lt;code&gt;include &amp;quot;file.php&amp;quot;&lt;/code&gt; is the same as &lt;br&gt;
&lt;code&gt;include(&amp;quot;file.php&amp;quot;)&lt;/code&gt;. Setting that aside, PHP projects rarely execute the &lt;br&gt;
include themselves - they let an autoloader handle it, so the autoloader &lt;br&gt;
must know which version to load. This isn't something that even NPM does - &lt;br&gt;
it just aliases and makes both libraries available. The caller still must &lt;br&gt;
specify which library is being pulled in.&lt;/p&gt;
&lt;p&gt;Node modules have a single point of entry, defined in the package.json file &lt;br&gt;
but usually index.js. In most Node packages this index.js imports all the &lt;br&gt;
public parts of the package and immediately exports them. Further, an &lt;br&gt;
import in node is an object (as is everything in JavaScript) that &lt;br&gt;
corresponds to that file.  Hence&lt;/p&gt;
&lt;p&gt;import { foo, bar } from 'MyPackage';&lt;/p&gt;
&lt;p&gt;This is using JavaScripts dereference mechanic to pluck members of an &lt;br&gt;
object into the current symbol table.  I could go on, but I think it's more &lt;br&gt;
on topic to just say that Node's import/export mechanic, elegant as it &lt;br&gt;
looks, is highly bound to JavaScript's scope rules and  how its symbol &lt;br&gt;
table works.  These aren't compatible with PHP.&lt;/p&gt;
&lt;p&gt;For one, PHP has two symbol tables - one for variables (which is why all &lt;br&gt;
variables start with $ ) and one for everything else. Variables are &lt;br&gt;
affected by function scope, nothing else is. For example, if you define a &lt;br&gt;
function within a function in JavaScript that function will be private to &lt;br&gt;
the function it is defined in - it can't be seen in other scopes. In PHP &lt;br&gt;
the function will be visible on the symbol table.&lt;/p&gt;
&lt;p&gt;For another, Node gives each file its own module scope. To move a symbol &lt;br&gt;
from one file to another you should use export and import. This creates a &lt;br&gt;
clear chain of custody for objects and symbols, but by God it also creates &lt;br&gt;
a LOT of boilerplate that the PHP community has no interest in replicating.&lt;/p&gt;
&lt;p&gt;Without the chain of custody you rapidly run into trouble. It doesn't &lt;br&gt;
matter if you try to allow the user to put a prefix on the namespace as I &lt;br&gt;
once suggested, or have PHP's engine prefix it automagically somehow - you &lt;br&gt;
still need to correctly disambiguate every blasted reference to that &lt;br&gt;
namespace. This is no easy task - take a look at the code of Strauss - &lt;br&gt;
&lt;a href="https://github.com/BrianHenryIE/strauss" rel="nofollow" target="_blank"&gt;https://github.com/BrianHenryIE/strauss&lt;/a&gt; That project allows you to rewrite &lt;br&gt;
a package with a new namespace, in effect doing it in userland. But as a &lt;br&gt;
precaution it prefixes every single package imported and severs the tie &lt;br&gt;
back to the original packagist.  Strauss is used by several WordPress &lt;br&gt;
plugins to make composer library use possible while still remaining &lt;br&gt;
portable between WordPress sites.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The only drawback of having modules like that would be that final &lt;br&gt;
dependency trees in Composer would be non-flat, but again, I think this &lt;br&gt;
non-flat system should be opt-in. Similarly to how flat systems are &lt;br&gt;
opt-in in the Node.js ecosystem (and trust me, I've tried to enforce &lt;br&gt;
&amp;quot;flat&amp;quot; dependencies resolutions in certain Node projects, and it's a &lt;br&gt;
huge hassle). Luckily, the PHP ecosystem is quite fine so far, compared &lt;br&gt;
to Node, and I would definitely keep the &amp;quot;flat&amp;quot; system in Composer for &lt;br&gt;
as long as possible, and make non-flat resolutions only case-specific &lt;br&gt;
(which is rare, and usually framework-dependent, like with Wordpress &lt;br&gt;
plugins for instance).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don't think it's a reasonable ask of Composer or any other dependency &lt;br&gt;
manager to try to resolve this without having a clear binding map like the &lt;br&gt;
one JavaScript forces you to create by how its module system works.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I still hope we could have a grouped discussion on this.&lt;/p&gt;
&lt;p&gt;Larry's Modules proposal (here: &lt;br&gt;
&lt;a href="https://github.com/Crell/php-rfcs/blob/master/modules/spec-brainstorm.md" rel="nofollow" target="_blank"&gt;https://github.com/Crell/php-rfcs/blob/master/modules/spec-brainstorm.md&lt;/a&gt; )&lt;/p&gt;
&lt;p&gt;is IMO a very good starting point, and it only lacks the &amp;quot;multiple &lt;br&gt;
modules with different versions&amp;quot;. And module definition with an INI file &lt;br&gt;
looks interesting.&lt;/p&gt;
&lt;p&gt;Adding a &amp;quot;container&amp;quot; system when importing a module can maybe allow &lt;br&gt;
this, I don't know...?&lt;/p&gt;
&lt;p&gt;@Michael: do you think you could start a new thread for PHP containers? &lt;br&gt;
Do you already have some research that you could bring for a pre-RFC &lt;br&gt;
discussion?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is the Container thread - I changed the subject line on my previous &lt;br&gt;
reply although I did include (was: ) so that people could track I was &lt;br&gt;
forking.&lt;/p&gt;
&lt;p&gt;I don't have much to add beyond my previous post. I haven't heard from &lt;br&gt;
anyone with engine experience about the feasibility or difficulty of what I &lt;br&gt;
propose.  To review (for anyone just joining but missing the previous &lt;br&gt;
message)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The user signals to the engine they want to include a php file AND &lt;br&gt;
process it independent of the current execution environment. No shared user &lt;br&gt;
defined symbols or variables.&lt;/li&gt;
&lt;li&gt;That file returns an interface so that the calling thread can talk to &lt;br&gt;
the child.&lt;/li&gt;
&lt;li&gt;As the processes reside on different threads these calls will need to be &lt;br&gt;
asynchronous to be optimal, otherwise the caller will be in a blocked state &lt;br&gt;
while the child executes the called method. It can work without the PHP &lt;br&gt;
Async / Await RFC's conclusion, but it won't be in ideal form without it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Containers provide process isolation. Say I have a WordPress plugin that I &lt;br&gt;
want to use composer libraries with. Say, Guzzle.  I can write my own &lt;br&gt;
container interface without touching Guzzle's code exposing the parts of &lt;br&gt;
Guzzle I need for my plugin. Since WordPress has no current core composer &lt;br&gt;
support I would need to carry a loader in my distro to be ran on the &lt;br&gt;
install hook of the plugin, bringing in composer and letting it in turn &lt;br&gt;
pull the libraries that I need to use.  If someone later writes a plugin &lt;br&gt;
that uses an incompatible version of Guzzle that doesn't matter - even if &lt;br&gt;
they lazily load it into the main symbol table by not using a container. &lt;br&gt;
My plugin is isolated.&lt;/p&gt;
&lt;p&gt;That isolation comes at a price. Each plugin has an independent vendor &lt;br&gt;
directory with no way to resolve complete redundancy. At least not in &lt;br&gt;
WordPress, which has no current composer implementation in core (I'm on the &lt;br&gt;
wp trac in a thread discussing it though).&lt;/p&gt;
&lt;p&gt;There are open questions though that must be answered before this container &lt;br&gt;
idea is seriously explored. Most critical, can PHP be made to handle an &lt;br&gt;
object passing from one thread to another? That is, continuing from the &lt;br&gt;
example above, can a client instance from one GuzzleContainer coexist on &lt;br&gt;
the main thread with a client instance from a different container and &lt;br&gt;
referencing different code? Or will methods be unable to cross the barrier? &lt;br&gt;
What are the implications for the Reflection API and using it to examine an &lt;br&gt;
object that originated from another process thread referencing symbols that &lt;br&gt;
don't exist on the current thread?&lt;/p&gt;
&lt;p&gt;The idea of containers is simple to state - but the implications are &lt;br&gt;
profound and might be unworkable. I simply don't know enough about the PHP &lt;br&gt;
engine to know.&lt;/p&gt;
</description><guid>CAEUnE0cygEXna9+KzYiZEwC_Nr948Y+HJBNAy8eTswW6xynBcw@mail.gmail.com</guid><pubDate>Tue, 16 Jun 2026 04:45:01 +0000</pubDate></item><item><title>[RFC] Pure-code source files via the .phpc extension</title><link>https://externals.io/message/131311</link><description>&lt;blockquote&gt;
&lt;p&gt;Am 15.06.2026 um 10:43 schrieb Kamil Tekiela &lt;a href="mailto:tekiela246@gmail.com"&gt;tekiela246@gmail.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;Following the pre-RFC discussion from late May [1], I'm moving the &lt;br&gt;
&amp;quot;pure-code source files&amp;quot; proposal into formal RFC stage as&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.php.net/rfc/optional_php_tags" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/optional_php_tags&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The mechanism is a single new opt-in file extension, .phpc, whose &lt;br&gt;
semantics are: the file is parsed as pure PHP. The lexer enters &lt;br&gt;
ST_IN_SCRIPTING on the first byte; no opening &amp;lt;?php is required. &lt;br&gt;
A leading UTF-8 BOM and a CLI shebang are silently skipped. The &lt;br&gt;
classic .php extension and every other code-loading path are &lt;br&gt;
completely untouched - the change is strictly additive.&lt;/p&gt;
&lt;p&gt;Reference implementation: PR against php/php-src (link in the RFC). &lt;br&gt;
Patch is ~50 lines of straight-line C in &lt;br&gt;
Zend/zend_language_scanner.l::open_file_for_scanning, plus 15 new &lt;br&gt;
.phpt tests in Zend/tests/phpc/. Full regression run against Zend/, &lt;br&gt;
ext/tokenizer/, ext/standard/, ext/spl/, ext/reflection/, ext/phar/ &lt;br&gt;
(9836 tests): 0 failures, 0 modifications to any pre-existing test.&lt;/p&gt;
&lt;p&gt;Pre-RFC feedback, addressed in the RFC document:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Ben Ramsey on engine-vs-SAPI dispatch: &lt;br&gt;
own section explaining why include/require/Phar all live below &lt;br&gt;
SAPI and need engine-level handling. Ben's -p/stdin idea is &lt;br&gt;
adopted as Future Scope (a sister RFC after this one).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Alex Rock on alternatives (env var, include_pure keyword, &lt;br&gt;
declare(pure=1)): each rebutted individually under &amp;quot;Rejected &lt;br&gt;
Alternatives&amp;quot;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Bruce Weirdan on BC of the .phpc extension itself: own &lt;br&gt;
paragraph in the BC section, honest about the fact that I have &lt;br&gt;
NOT scanned public corpora; asking voters with private-codebase &lt;br&gt;
visibility for data points during Discussion.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;.pyc visual collision and scattered prior .phpc usage: &lt;br&gt;
addressed via a sub-vote on the extension name (.phpc / .phpp / &lt;br&gt;
.pcode / .phpx).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Security (source-code exposure via misconfigured webservers, &lt;br&gt;
the historic .inc footgun): own section with mandatory &lt;br&gt;
documentation commitments and canonical Apache/Nginx/Caddy/ &lt;br&gt;
FrankenPHP snippets in Appendix A.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Boutell 2012 and Ohgaki 2014: own section distinguishing this &lt;br&gt;
proposal mechanically from both.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Discussion period: at least two weeks from today. Looking forward &lt;br&gt;
to feedback, especially on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Open Issues block in the RFC (extension name, real-world &lt;br&gt;
.phpc-in-use data, case-sensitivity on Windows/macOS).&lt;/li&gt;
&lt;li&gt;Anything in the Phar / OPcache surface I should test more &lt;br&gt;
thoroughly before voting opens.&lt;/li&gt;
&lt;li&gt;Whether the Security section's commitments are strong enough.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks for reading, &lt;br&gt;
Hendrik Mennen&lt;/p&gt;
&lt;p&gt;[1] &lt;a href="https://news-web.php.net/php.internals/131024" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/131024&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I tried to catch up on this discussion last night. I see a lot of things that could go wrong with this, but I don't see a clear motivation for why would we want this change.&lt;/p&gt;
&lt;p&gt;Reduced ceremony in pure-code files.&lt;br /&gt;
This is a moot point because after the change you still have the ceremony of adding .phpc to every file. Just unnecessary churn.&lt;/p&gt;
&lt;p&gt;First-class CLI scripts.&lt;br /&gt;
Is this really a big concern? Is it going to work better? Are there things you cannot do today because of it?&lt;/p&gt;
&lt;p&gt;Clearer file-mode intent.&lt;br /&gt;
We already have that. By convention many people add .php extension to pure PHP files, and .phtml to templates. It's not mandated by a language and people are free to choose their naming conventions.&lt;/p&gt;
&lt;p&gt;Strictly additive.&lt;br /&gt;
That's not entirely true, but that's beside the point. Why is this one of the main motivations? We don't add things just because we can. They need to have a purpose.&lt;/p&gt;
&lt;p&gt;We already have a good way of writing pure PHP code files. Just add 5 characters at the beginning of the file &amp;lt;?php and the rest of the file will be treated as PHP source code.&lt;/p&gt;
&lt;p&gt;I would also like to echo what others said that PHP source code doesn't have to be within &amp;lt;?php. A text file will be compiled and interpreted by PHP as a print statement. Even in pure PHP code files you may want to escape the PHP context with ?&amp;gt;. Mandating that a file with a certain extension will have these restrictions is worse than having to start every file with &amp;lt;?PHP.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Kamil&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Kamil,&lt;/p&gt;
&lt;p&gt;Thanks for the substantive pushback - these are exactly the right &lt;br&gt;
questions, and you're correct on more of them than the RFC as currently &lt;br&gt;
worded admits.&lt;/p&gt;
&lt;p&gt;Conceding upfront: &amp;quot;strictly additive&amp;quot; is a necessary property, not a &lt;br&gt;
motivation. I leaned on it too much. Same for the three weaker arguments &lt;br&gt;
(CLI ergonomics, convention clarity, ceremony shift) - none of them &lt;br&gt;
alone justifies the mechanism.&lt;/p&gt;
&lt;p&gt;The honest single-sentence motivation:&lt;/p&gt;
&lt;p&gt;Most new PHP files written today are pure code (framework classes, &lt;br&gt;
autoloaders, console commands, configuration). For those files the &lt;br&gt;
&amp;lt;?php opener carries zero semantic information. PHP is the only &lt;br&gt;
modern mainstream language where it is mandatory.&lt;/p&gt;
&lt;p&gt;If that friction is not worth solving, that is a legitimate position &lt;br&gt;
and I would rather hear that than dress the proposal up to look &lt;br&gt;
weightier than it is. Three honest paths from here, and I would find &lt;br&gt;
it useful if respondents could say which they are closest to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The friction is real and a small targeted addition is worth &lt;br&gt;
shipping. (what the RFC proposes)&lt;/li&gt;
&lt;li&gt;The friction is real but the mechanism is wrong. (in which case: &lt;br&gt;
what signal would you prefer? per-file declare, magic first line, &lt;br&gt;
SAPI-only, ...)&lt;/li&gt;
&lt;li&gt;The friction is not real, or not worth a language change at all.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That is a sharper question than re-litigating each motivation in turn, &lt;br&gt;
and the answer determines whether to refine, pivot, or withdraw before &lt;br&gt;
voting.&lt;/p&gt;
&lt;p&gt;On your last point - that .phpc &amp;quot;restricts&amp;quot; PHP's text-as-print &lt;br&gt;
feature - I think we agree more than disagree. .phpc would not change &lt;br&gt;
.php behaviour at all. It is opt-in by filename. Authors who want the &lt;br&gt;
templating shape keep using .php, ?&amp;gt; drop-out continues to work inside &lt;br&gt;
.phpc, and the engine on existing files is byte-for-byte identical. &lt;br&gt;
The &amp;quot;restriction&amp;quot; you describe (no top-of-file inline content; &lt;br&gt;
&amp;lt;?php-as-tag rejected inside .phpc) is intentional - it is what makes &lt;br&gt;
the mode meaningful for the cases that opt in.&lt;/p&gt;
&lt;p&gt;I will update the RFC's Motivation section to reflect this &lt;br&gt;
clarification in the next day or two so the rest of the Discussion &lt;br&gt;
runs on the stronger framing rather than the weaker one I shipped &lt;br&gt;
with.&lt;/p&gt;
&lt;p&gt;Thanks again, &lt;br&gt;
Hendrik&lt;/p&gt;
</description><guid>9E9C0402-AD66-4AA0-A64D-818BB36AA7A7@gmail.com</guid><pubDate>Tue, 16 Jun 2026 04:20:31 +0000</pubDate></item><item><title>[RFC] Working Groups</title><link>https://externals.io/message/131310</link><description>&lt;p&gt;2026年6月16日(火) 1:02 Larry Garfield &lt;a href="mailto:larry@garfieldtech.com"&gt;larry@garfieldtech.com&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Anything that doesn't need special powers can more efficiently be organized without the overhead of the initial RFC, as can also be seen by The PHP Foundation planning to launch 6 “special interest groups” in the remainder of 2026 without needing to involve the PHP project:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://thephp.foundation/blog/2026/06/11/integrating-community-" rel="nofollow" target="_blank"&gt;https://thephp.foundation/blog/2026/06/11/integrating-community-&lt;/a&gt; feedback-into-foundation-strategy-part2/#community-special-interest-groups&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'm aware of the PHP Foundation special interest groups, and Elizabeth and I discussed them before I opened the Working Groups RFC for discussion. We agreed they do not cover the same ground as the Working Groups RFC. By design, the PHP Foundation SIGs have no operational or governance authority over the PHP Project. There can be cross-pollination and collaboration between the initiatives, but the SIGs are external, community-focused, interest groups, while PHP WGs are internal, PHP Project-focused, operational groups.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My 2cents in the form of questions (because I might have missed something):&lt;/p&gt;
&lt;p&gt;Since the PHPF's role is to support, help and discuss, then shouldn't &lt;br&gt;
PHPF operatives be excluded from voting on RFCs, whatever the involved &lt;br&gt;
WG? It would ensure that the PHP voters (aka &amp;quot;&lt;em&gt;The community that &lt;br&gt;
includes contributors and core team members&lt;/em&gt;&amp;quot;) can take decisions &lt;br&gt;
without the PHPF being able to intervene if there's a disagreement &lt;br&gt;
between the two groups, I guess...?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;quot;PHPF operatives&amp;quot; sounds very negative.  Bear in mind, the Foundation currently employs a majority of the people who really understand the PHP engine and how to maintain it.  Excluding them from voting would be.. project suicide.&lt;/p&gt;
&lt;p&gt;The Foundation has no vote.  The people who do half the work for PHP, who happen to work for the Foundation, have votes.  As they should.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;And similarly, shouldn't there be a mandatory consultation from the PHP &lt;br&gt;
community when the PHPF actually operates on something that impacts the &lt;br&gt;
community on non-RFC-mandatory-operations, like marketing, &lt;br&gt;
communication, etc.? I mean, if at some point the PHPF communicates on &lt;br&gt;
the web on something the PHP community would disagree with (concluded &lt;br&gt;
via a vote of whatever sort), shouldn't the PHPF, as a &amp;quot;consultative &lt;br&gt;
agency&amp;quot;, have to update their acts and productions to fit to the &lt;br&gt;
community's views? (that would solve parts of the issues with the &lt;br&gt;
recent hot discussions on a certain link to a certain platform on PHP's &lt;br&gt;
website, for example).&lt;/p&gt;
&lt;p&gt;All these questions are here because PHP has no official governance &lt;br&gt;
other than the (sometimes vaguely) designated &amp;quot;PHP Community&amp;quot;, and the &lt;br&gt;
PHPF's role, from what I understand, is mostly to &lt;em&gt;help the community &lt;br&gt;
to decide and act&lt;/em&gt; on PHP-related tasks, but &lt;em&gt;not directly decide nor &lt;br&gt;
act&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I might be off of some details, so feel free to correct me if I miss &lt;br&gt;
something, if I'm mistaking, or if I misunderstand certain roles or &lt;br&gt;
notions.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;From the Foundation's home page:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;The PHP Foundation is a collective of people and organizations relying on the PHP language. Its mission is to ensure the long-term prosperity of the PHP language.

The PHP Foundation focuses on providing financial support and guidance to PHP language developers to support its goals of improving the language for its users, providing high-quality maintenance, and improving the PHP language project to retain current contributors and to integrate new contributors.

The PHP Foundation aims to promote the public image of the PHP language in the interest of retaining existing and gaining new users and contributors.

Read our announcement for more details.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That's what the Foundation does and is for.&lt;/p&gt;
&lt;p&gt;It really seems like you're inventing problems that do not exist, and have no bearing on the project itself creating working groups.  That those WGs may overlap with the Foundation, both in goal and personnel, is a good thing in my mind.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Ben and Internals&lt;/p&gt;
&lt;p&gt;I agree this proposal. I'm glad that if this proposal is accepted.&lt;/p&gt;
&lt;p&gt;Please let me story that join in the php-src repo and this mailing list. &lt;br&gt;
So I spend many time (3-4 years?) because I don't know how to join &lt;br&gt;
this community. &lt;br&gt;
Therefore, Working groups can easy to access to this community from the world.&lt;/p&gt;
&lt;p&gt;I hope that people from all over the world who are interested will come.&lt;/p&gt;
&lt;h2&gt;Regards &lt;br&gt;
Yuya&lt;/h2&gt;
&lt;hr /&gt;
&lt;p&gt;Yuya Hamada (tekimen)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://tekitoh-memdhoi.info" rel="nofollow" target="_blank"&gt;https://tekitoh-memdhoi.info&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/youkidearitai" rel="nofollow" target="_blank"&gt;https://github.com/youkidearitai&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description><guid>CAEPPVa0-SYZvsQdu2QtR5PF47qw9u6w+BG73Fh78EL_fPWTK2A@mail.gmail.com</guid><pubDate>Tue, 16 Jun 2026 02:02:57 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131309</link><description>&lt;p&gt;On Tue, Jun 16, 2026, 1:31 AM Sarina Corrigan &lt;a href="mailto:sarina.corrigan@gmail.com"&gt;sarina.corrigan@gmail.com&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On Mon, Jun 15, 2026, 20:05 Seifeddine Gmati &lt;a href="mailto:azjezz@carthage.software"&gt;azjezz@carthage.software&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;While this RFC works alongside the pattern matching proposal by Larry and &lt;br&gt;
Ilija, neither requires the other. The two are unrelated for several &lt;br&gt;
reasons.&lt;/p&gt;
&lt;p&gt;So to answer your question, no, I am not looking for pattern matching. I &lt;br&gt;
see these as two distinct features that address different needs within the &lt;br&gt;
language.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don't believe they are addressing entirely different needs. I believe &lt;br&gt;
the feature that static analysis tools support is pattern matching more &lt;br&gt;
than it is typing. The question for me becomes whether patterns be &lt;br&gt;
represented through types, or whether they should be matched against values.&lt;/p&gt;
&lt;p&gt;Strictly denoting types and validating patterns are two separate concerns. &lt;br&gt;
One asks &amp;quot;What can I do with this?&amp;quot; while the other asks &amp;quot;Is this within &lt;br&gt;
expected bounds?&amp;quot;. I am personally not against validating patterns within &lt;br&gt;
type declarations, as is supported in Typescript, Scala (I believe), and to &lt;br&gt;
an extent PHP with false|true. But I do believe they are different concerns.&lt;/p&gt;
&lt;p&gt;I also think that, this being a form of pattern matching, if approved &lt;br&gt;
would set a direction for the pattern matching RFC to treat patterns more &lt;br&gt;
closely as types than assertions and guards (as their RFC currently &lt;br&gt;
proposes). I am again not saying this is a bad thing, but it is worth &lt;br&gt;
acknowledging.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Sarina,&lt;/p&gt;
&lt;p&gt;I don't think we disagree here. I already said above that I think pattern &lt;br&gt;
matching should match against types with variable binding; this actually &lt;br&gt;
makes pattern matching easier because to expand it, you just have to expand &lt;br&gt;
the type system, and patterns get expanded for free.&lt;/p&gt;
&lt;p&gt;However, I think this is a discussion for the pattern matching RFC, not for &lt;br&gt;
the literal types RFC.&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Seifeddine.&lt;/p&gt;
</description><guid>CAFyg4HjXc1V14csSCob3juGpPrUe9B-7R8B+=jjsEUNkhidk5w@mail.gmail.com</guid><pubDate>Tue, 16 Jun 2026 00:44:32 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131308</link><description>&lt;p&gt;On Mon, Jun 15, 2026, 20:05 Seifeddine Gmati &lt;a href="mailto:azjezz@carthage.software"&gt;azjezz@carthage.software&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;While this RFC works alongside the pattern matching proposal by Larry and &lt;br&gt;
Ilija, neither requires the other. The two are unrelated for several &lt;br&gt;
reasons.&lt;/p&gt;
&lt;p&gt;So to answer your question, no, I am not looking for pattern matching. I &lt;br&gt;
see these as two distinct features that address different needs within the &lt;br&gt;
language.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I don't believe they are addressing entirely different needs. I believe the &lt;br&gt;
feature that static analysis tools support is pattern matching more than it &lt;br&gt;
is typing. The question for me becomes whether patterns be represented &lt;br&gt;
through types, or whether they should be matched against values.&lt;/p&gt;
&lt;p&gt;Strictly denoting types and validating patterns are two separate concerns. &lt;br&gt;
One asks &amp;quot;What can I do with this?&amp;quot; while the other asks &amp;quot;Is this within &lt;br&gt;
expected bounds?&amp;quot;. I am personally not against validating patterns within &lt;br&gt;
type declarations, as is supported in Typescript, Scala (I believe), and to &lt;br&gt;
an extent PHP with false|true. But I do believe they are different concerns.&lt;/p&gt;
&lt;p&gt;I also think that, this being a form of pattern matching, if approved would &lt;br&gt;
set a direction for the pattern matching RFC to treat patterns more closely &lt;br&gt;
as types than assertions and guards (as their RFC currently proposes). I am &lt;br&gt;
again not saying this is a bad thing, but it is worth acknowledging.&lt;/p&gt;
</description><guid>CAKqZJsy1yYHC-eiC5qCs9RVrHRmTiWiV=-XHcj+QgQzX=QYASQ@mail.gmail.com</guid><pubDate>Tue, 16 Jun 2026 00:31:44 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131307</link><description>&lt;blockquote&gt;
&lt;p&gt;Hey Seifeddine,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Am 15.06.2026 um 03:22 schrieb Seifeddine Gmati &amp;&lt;a href="mailto:lt;azjezz@carthage.software" rel="nofollow" target="_blank"&gt;lt;azjezz@carthage.software&lt;/a&gt; &lt;br&gt;
:&lt;/p&gt;
&lt;p&gt;Hello Internals,&lt;/p&gt;
&lt;p&gt;I'd like to start the discussion on a new RFC adding literal scalar &lt;br&gt;
types to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/literal_scalar_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/literal_scalar_types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/22314" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22314&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Seifeddine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I think you are solving the wrong (or rather: only a specific subset of &lt;br&gt;
the) problem. What you &lt;em&gt;actually&lt;/em&gt; probably want is pattern support in type &lt;br&gt;
positions. Let me know if I'm wrong in my assumption here.&lt;/p&gt;
&lt;p&gt;I.e. basically support expressions as specified by &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/pattern-matching" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/pattern-matching&lt;/a&gt; in property and function &lt;br&gt;
argument/return positions. Which does this, and ranges and everything else &lt;br&gt;
you'd need.&lt;/p&gt;
&lt;p&gt;Which is a worthwhile addition, but we should first get pattern-matching &lt;br&gt;
done, then we can do one RFC broadening the applicability of patterns.&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Bob,&lt;/p&gt;
&lt;p&gt;My interest is not pattern matching; my focus is on the type system and &lt;br&gt;
expanding it to be more expressive. My main motivation is that static &lt;br&gt;
analysis tools (like PHPStan, Psalm, and Mago) already do many things that &lt;br&gt;
PHP itself cannot, and I believe those features belong in the engine. &lt;br&gt;
Literal types serve as a fundamental building block for future type system &lt;br&gt;
features such as array shapes, tuples, and potentially even conditional &lt;br&gt;
types.&lt;/p&gt;
&lt;p&gt;While this RFC works alongside the pattern matching proposal by Larry and &lt;br&gt;
Ilija, neither requires the other. The two are unrelated for several &lt;br&gt;
reasons.&lt;/p&gt;
&lt;p&gt;So to answer your question, no, I am not looking for pattern matching. I &lt;br&gt;
see these as two distinct features that address different needs within the &lt;br&gt;
language.&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Seifeddine.&lt;/p&gt;
</description><guid>CAFyg4His+aXaeoaBfqNOqmTu5gKB_AyQuskOwjBgzavSNGAHHQ@mail.gmail.com</guid><pubDate>Tue, 16 Jun 2026 00:02:36 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131306</link><description>&lt;p&gt;Hey Seifeddine,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Am 15.06.2026 um 03:22 schrieb Seifeddine Gmati &lt;a href="mailto:azjezz@carthage.software"&gt;azjezz@carthage.software&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;Hello Internals,&lt;/p&gt;
&lt;p&gt;I'd like to start the discussion on a new RFC adding literal scalar &lt;br&gt;
types to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/literal_scalar_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/literal_scalar_types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/22314" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22314&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Seifeddine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I think you are solving the wrong (or rather: only a specific subset of the) problem. What you &lt;em&gt;actually&lt;/em&gt; probably want is pattern support in type positions. Let me know if I'm wrong in my assumption here.&lt;/p&gt;
&lt;p&gt;I.e. basically support expressions as specified by &lt;a href="https://wiki.php.net/rfc/pattern-matching" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/pattern-matching&lt;/a&gt; in property and function argument/return positions. Which does this, and ranges and everything else you'd need.&lt;/p&gt;
&lt;p&gt;Which is a worthwhile addition, but we should first get pattern-matching done, then we can do one RFC broadening the applicability of patterns.&lt;/p&gt;
&lt;p&gt;Bob&lt;/p&gt;
</description><guid>89F5B2EA-A61A-4759-B700-2B97A60AF346@hotmail.com</guid><pubDate>Mon, 15 Jun 2026 22:59:53 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131305</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For what it is worth, I am personally fine with &lt;code&gt;tenths(0.1 + 0.2)&lt;/code&gt; &lt;br&gt;
failing to match &lt;code&gt;0.3&lt;/code&gt;. This is not new behaviour: &lt;code&gt;0.1 + 0.2 == 0.3&lt;/code&gt; &lt;br&gt;
is already false, and a &lt;code&gt;match (0.1 + 0.2)&lt;/code&gt; already skips a &lt;code&gt;0.3&lt;/code&gt; arm &lt;br&gt;
for exactly the same reason. So a literal float type behaves &lt;br&gt;
consistently with comparison and &lt;code&gt;match&lt;/code&gt;, rather than introducing a &lt;br&gt;
new surprise.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, it is consistent with the existing behavior, but I don't think that &lt;br&gt;
this makes it any less confusing. And for this specific proposal, adding &lt;br&gt;
support for floats would be a deliberate decision rather than just &lt;br&gt;
something that naturally follows from “existing === semantics” as with &lt;br&gt;
&lt;code&gt;match()&lt;/code&gt; which works on two values rather than values + types.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On your concrete questions: &lt;code&gt;4e3&lt;/code&gt; is a valid float literal and works &lt;br&gt;
today; it normalizes to &lt;code&gt;4000.0&lt;/code&gt; (the type also stringifies as &lt;br&gt;
&lt;code&gt;4000.0&lt;/code&gt;). &lt;code&gt;NAN&lt;/code&gt; and &lt;code&gt;INF&lt;/code&gt;, on the other hand, are not literals but &lt;br&gt;
constant identifiers that go through constant resolution. They are out &lt;br&gt;
of scope for the same reason &lt;code&gt;FOO&lt;/code&gt; is above: &lt;code&gt;NAN $foo&lt;/code&gt; could just as &lt;br&gt;
well mean a class named &lt;code&gt;NAN&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, I'm aware (based on a look at the implementation). This was &lt;br&gt;
intended to be a subtle note that this is not explicitly spelled out in &lt;br&gt;
the RFC.&lt;/p&gt;
&lt;p&gt;The RFC text should comprehensively explain the behavior all possible &lt;br&gt;
edge cases and ambiguities so that folks can form an educated opinion &lt;br&gt;
based on the RFC text alone without needing to be able to understand the &lt;br&gt;
implementation.&lt;/p&gt;
&lt;p&gt;Writing that out, I also notice that the “Ecosystem” sub-section is &lt;br&gt;
missing from the “RFC Impact” section (and the “To Existing Extensions &lt;br&gt;
” sub-subsection would probably also be useful to know) and the voting &lt;br&gt;
widget is also missing.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Tim,&lt;/p&gt;
&lt;p&gt;That is fair. Float support should be a deliberate choice rather than &lt;br&gt;
something that rides in on existing &lt;code&gt;===&lt;/code&gt; semantics; the &lt;code&gt;match&lt;/code&gt; &lt;br&gt;
analogy only goes so far, since &lt;code&gt;match&lt;/code&gt; compares two values whereas &lt;br&gt;
this compares a value against a type.&lt;/p&gt;
&lt;p&gt;You are also right that the RFC text has to stand on its own. I will &lt;br&gt;
expand it to spell out the edge cases explicitly, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Which numeric forms are accepted and how they normalize. &lt;br&gt;
Hexadecimal, octal, binary and underscore-separated integer literals &lt;br&gt;
(&lt;code&gt;0x1A&lt;/code&gt;, &lt;code&gt;0o17&lt;/code&gt;, &lt;code&gt;0b101&lt;/code&gt;, &lt;code&gt;1_000&lt;/code&gt;) all canonicalize to their value, &lt;br&gt;
and &lt;code&gt;4e3&lt;/code&gt; is a valid float literal normalizing to &lt;code&gt;4000.0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;That &lt;code&gt;NAN&lt;/code&gt; and &lt;code&gt;INF&lt;/code&gt; are constants, not literals, and so are not &lt;br&gt;
accepted, for the same reason a bare &lt;code&gt;FOO&lt;/code&gt; is not.&lt;/li&gt;
&lt;li&gt;String literal handling: single versus double quotes, escape &lt;br&gt;
resolution, and the rejection of interpolation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I will also add the missing &amp;quot;Ecosystem&amp;quot; and &amp;quot;To Existing Extensions&amp;quot; &lt;br&gt;
subsections under &amp;quot;RFC Impact&amp;quot;, and the voting widget.&lt;/p&gt;
&lt;p&gt;On voting: rather than a single yes/no, would it make sense to split &lt;br&gt;
it so each decision can stand on its own?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add support for literal string types. (2/3)&lt;/li&gt;
&lt;li&gt;Add support for literal integer types. (2/3)&lt;/li&gt;
&lt;li&gt;Add support for literal float types. (2/3)&lt;/li&gt;
&lt;li&gt;Coercion behaviour: coerce to the base type before checking &lt;br&gt;
membership (as the RFC currently describes), or always require an &lt;br&gt;
identity match. (1/2)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The last one is worth surfacing in particular. &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;false&lt;/code&gt; and &lt;br&gt;
&lt;code&gt;null&lt;/code&gt; do not coerce at all today, even in coercive mode: passing &lt;code&gt;1&lt;/code&gt; &lt;br&gt;
to a &lt;code&gt;true&lt;/code&gt; parameter is a &lt;code&gt;TypeError&lt;/code&gt;, not a coercion to &lt;code&gt;true&lt;/code&gt;. If &lt;br&gt;
we want literal scalars to be consistent with the existing value &lt;br&gt;
types, an identity match is arguably the more natural behaviour, so I &lt;br&gt;
would rather put it to the list than bake it in.&lt;/p&gt;
&lt;p&gt;Best regards, &lt;br&gt;
Seifeddine&lt;/p&gt;
</description><guid>CAFyg4Hi88H8RnRN1P5ZFj=xXzYyo2vWpoKVZS1+es9YhSsuPsg@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 22:37:23 +0000</pubDate></item><item><title>[RFC] [Discussion] Query Parameter Manipulation Support</title><link>https://externals.io/message/131304</link><description>&lt;p&gt;Hi Tim,&lt;/p&gt;
&lt;p&gt;First of all, thanks for your detailed explanation!&lt;/p&gt;
&lt;p&gt;Does that make sense?&lt;/p&gt;
&lt;blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sure, this is a very sensible approach, similar to the algorithms I have &lt;br&gt;
also considered myself before. The reason why I &lt;br&gt;
started to search for alternatives is because lookups are inefficient this &lt;br&gt;
way: all get*() methods have an O(n) time complexity &lt;br&gt;
by default, while currently, looking up keys in $_GET is O(1). This &lt;br&gt;
regression is what I tried to avoid with storing query params &lt;br&gt;
along with an array key.&lt;/p&gt;
&lt;p&gt;However, I realized in the meanwhile that it may be possible to eliminate &lt;br&gt;
much of the performance overhead by using two hash tables: &lt;br&gt;
one for exact search (WHATWG URL-alike API), and one for searching the &lt;br&gt;
prefixes before the [] pair (for the array API). I haven't &lt;br&gt;
tried this idea out yet in practice, so I'll need to do some POC first &lt;br&gt;
before continuing with the RFC.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Máté&lt;/p&gt;
</description><guid>CAH5C8xU3nRur-O06AWiJpEME65X7Q9-eZ6CLCdPj+pek2j_5LQ@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 20:36:47 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131303</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For what it is worth, I am personally fine with &lt;code&gt;tenths(0.1 + 0.2)&lt;/code&gt; &lt;br&gt;
failing to match &lt;code&gt;0.3&lt;/code&gt;. This is not new behaviour: &lt;code&gt;0.1 + 0.2 == 0.3&lt;/code&gt; &lt;br&gt;
is already false, and a &lt;code&gt;match (0.1 + 0.2)&lt;/code&gt; already skips a &lt;code&gt;0.3&lt;/code&gt; arm &lt;br&gt;
for exactly the same reason. So a literal float type behaves &lt;br&gt;
consistently with comparison and &lt;code&gt;match&lt;/code&gt;, rather than introducing a &lt;br&gt;
new surprise.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, it is consistent with the existing behavior, but I don't think that &lt;br&gt;
this makes it any less confusing. And for this specific proposal, adding &lt;br&gt;
support for floats would be a deliberate decision rather than just &lt;br&gt;
something that naturally follows from “existing === semantics” as with &lt;br&gt;
&lt;code&gt;match()&lt;/code&gt; which works on two values rather than values + types.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;On your concrete questions: &lt;code&gt;4e3&lt;/code&gt; is a valid float literal and works &lt;br&gt;
today; it normalizes to &lt;code&gt;4000.0&lt;/code&gt; (the type also stringifies as &lt;br&gt;
&lt;code&gt;4000.0&lt;/code&gt;). &lt;code&gt;NAN&lt;/code&gt; and &lt;code&gt;INF&lt;/code&gt;, on the other hand, are not literals but &lt;br&gt;
constant identifiers that go through constant resolution. They are out &lt;br&gt;
of scope for the same reason &lt;code&gt;FOO&lt;/code&gt; is above: &lt;code&gt;NAN $foo&lt;/code&gt; could just as &lt;br&gt;
well mean a class named &lt;code&gt;NAN&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, I'm aware (based on a look at the implementation). This was &lt;br&gt;
intended to be a subtle note that this is not explicitly spelled out in &lt;br&gt;
the RFC.&lt;/p&gt;
&lt;p&gt;The RFC text should comprehensively explain the behavior all possible &lt;br&gt;
edge cases and ambiguities so that folks can form an educated opinion &lt;br&gt;
based on the RFC text alone without needing to be able to understand the &lt;br&gt;
implementation.&lt;/p&gt;
&lt;p&gt;Writing that out, I also notice that the “Ecosystem” sub-section is &lt;br&gt;
missing from the “RFC Impact” section (and the “To Existing Extensions &lt;br&gt;
” sub-subsection would probably also be useful to know) and the voting &lt;br&gt;
widget is also missing.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>51350649-aa48-4245-b383-198d970a44a9@bastelstu.be</guid><pubDate>Mon, 15 Jun 2026 20:32:53 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131302</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi Tim,&lt;/p&gt;
&lt;p&gt;I think I might agree here, and others have raised the same concern on &lt;br&gt;
Discord. Dropping float literals for now simplifies the RFC, so I am &lt;br&gt;
inclined to do that, though I would like to hear what others think &lt;br&gt;
before removing them.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We debated allowing float as a backing type for enums, and eventually decided against it for a similar reason: It's not stable or discrete enough to be useful, and no other language we looked at supported them.&lt;/p&gt;
&lt;p&gt;I'm still undecided on the RFC as a whole (I need to fully read it first), but would support limiting the literals to just int and string.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>bdfb744f-262d-4dc9-aadc-e21c120113ce@app.fastmail.com</guid><pubDate>Mon, 15 Jun 2026 20:11:16 +0000</pubDate></item><item><title>[VOTE] [RFC] Bound-Erased Generic Types</title><link>https://externals.io/message/131301</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Voting is now open on the Bound-Erased Generic Types RFC, as announced &lt;br&gt;
in the Intent to Vote message earlier this week.&lt;/p&gt;
&lt;p&gt;The vote started on 2026-06-14 at 16:50 UTC and ends on 2026-06-28 at 17:00 UTC.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/bound_erased_generic_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/bound_erased_generic_types&lt;/a&gt; &lt;br&gt;
Discussion thread: &lt;a href="https://news-web.php.net/php.internals/130816" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/130816&lt;/a&gt; &lt;br&gt;
Implementation: &lt;a href="https://github.com/php/php-src/pull/21969" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/21969&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To my own surprise, I am voting yes on this proposal.&lt;/p&gt;
&lt;p&gt;I still believe that refied generics should be the goal. To that end, &lt;br&gt;
I think we should be able to merge this and in minor versions, fix &lt;br&gt;
&amp;quot;soundness&amp;quot; and implementation holes as &amp;quot;bug&amp;quot; fixes on that route. If &lt;br&gt;
internals can agree on this, and then the community can communicate &lt;br&gt;
this through education, promotion, documentation, etc, then this RFC &lt;br&gt;
is simply a useful stepping stone.&lt;/p&gt;
&lt;p&gt;This is based on my own experience playing with the RFC, which &lt;br&gt;
included reporting 2 bugs in the implementation on the RFC. To be &lt;br&gt;
honest, it's not too useful to me. I very quickly run up against some &lt;br&gt;
limitation when trying to build useful things. Most notably, we need &lt;br&gt;
to be able to define lower bounds (syntax pending, obviously):&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;But this is tangential to my main point: if we accept that we are &lt;br&gt;
moving towards fully reified generics, and this is only a stepping &lt;br&gt;
stone, and we document this widely and educate about it, then in &lt;br&gt;
future versions we can tighten from &amp;quot;bounds erased&amp;quot; to &amp;quot;fully &lt;br&gt;
reified.&amp;quot; Yes, there will still be breakages, but far, far fewer &lt;br&gt;
breakages. This should be tolerable.&lt;/p&gt;
&lt;p&gt;I don't want this RFC to be our final form: I only want it to be a &lt;br&gt;
stepping stone.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I concur.  My concern is, as Rob pointed out, it may not be possible to add enforced generics on top without API changes.  Not just &amp;quot;your code was already broken and now we're telling you&amp;quot; changes, but changing the way catch blocks behave.  I'm not sure if we're OK with that level of breakage if we incrementally add more enforcement.&lt;/p&gt;
&lt;p&gt;Is that concern valid?  I'm not sure.  We didn't get a chance to flesh it out before the vote was called.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>fc12b100-05a1-4451-9ad4-adbfb1402fdb@app.fastmail.com</guid><pubDate>Mon, 15 Jun 2026 19:49:04 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131300</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;describing APIs that already exist. &lt;code&gt;array_filter&lt;/code&gt;'s &lt;code&gt;$mode&lt;/code&gt; really &lt;br&gt;
accepts &lt;code&gt;0|1|2&lt;/code&gt;, but it's typed &lt;code&gt;int&lt;/code&gt; because that's all the type &lt;br&gt;
system can say today. we can't retype it as an enum without breaking &lt;br&gt;
every caller. a literal union lets the signature state the actual &lt;br&gt;
contract.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;We can retype this kind of API with enums.&lt;/p&gt;
&lt;p&gt;See the “Correctly name the rounding mode and make it an Enum” RFC &lt;br&gt;
(&lt;a href="https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum&lt;/a&gt;) &lt;br&gt;
for an example: We first widen the parameter to accept the enum so that &lt;br&gt;
folks can opt-in to the new API. At a later point we alias the constants &lt;br&gt;
to the corresponding enum cases and deprecate passing the integers and &lt;br&gt;
then we remove the support for the integers (and constants).&lt;/p&gt;
&lt;p&gt;Using literal types is going to result in a terrible user-experience, &lt;br&gt;
because the signature does not provide any hint as to which constants &lt;br&gt;
are supposed to be used with the API which means that the resulting &lt;br&gt;
error message is also useless to the user. Enums - or the existing &lt;br&gt;
manual validation - is much preferable here.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="2"&gt;
&lt;li&gt;ad-hoc / open value sets. for a library, &amp;quot;ascii&amp;quot;|&amp;quot;utf-8&amp;quot; would need &lt;br&gt;
its own named symbol ( &lt;code&gt;enum BorderStyle { case Ascii; case Utf8 }&lt;/code&gt;, a &lt;br&gt;
new file, an import ) for what is really two strings. and because an &lt;br&gt;
enum is a closed set, adding a third style later breaks any consumer &lt;br&gt;
that match-es over it without a default. widening the union on a &lt;br&gt;
parameter ( &amp;quot;ascii&amp;quot;|&amp;quot;utf-8&amp;quot;|&amp;quot;unicode&amp;quot; ) is contravariant, so it breaks &lt;br&gt;
nobody.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;The existing \RoundingMode enum is already intended to be a &lt;br&gt;
non-exhaustive (parameter-only) enum where users are expected to include &lt;br&gt;
a &lt;code&gt;default&lt;/code&gt; case in case new values are being added.&lt;/p&gt;
&lt;p&gt;I have a &lt;em&gt;very&lt;/em&gt; rough draft in &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/non_exhaustive_marker" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/non_exhaustive_marker&lt;/a&gt; to make this type of &lt;br&gt;
contract more explicit.&lt;/p&gt;
&lt;p&gt;Having an “own named symbol” for the allowed values is a benefit to me, &lt;br&gt;
because this makes it easy to reuse the list of allowed values in &lt;br&gt;
different locations without needing to resort to copy and paste, for &lt;br&gt;
example in decorators that just pass through the values without touching &lt;br&gt;
them.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="3"&gt;
&lt;li&gt;scalar interop. a literal value is the scalar, so it works as an &lt;br&gt;
array key, compares with ===, round-trips through json, etc. enum &lt;br&gt;
cases are objects and don't.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Enums can be compared with &lt;code&gt;===&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Fair points. I will happily concede that for the internal flag-style &lt;br&gt;
APIs (rounding mode, &lt;code&gt;array_filter&lt;/code&gt;, and so on) the enum migration &lt;br&gt;
path you describe is a good fit, and the reuse you get from a named &lt;br&gt;
symbol is a real benefit. I do not think literal types are the right &lt;br&gt;
tool for everything enums cover.&lt;/p&gt;
&lt;p&gt;On the &lt;code&gt;===&lt;/code&gt; point specifically: enums compare with &lt;code&gt;===&lt;/code&gt; to other &lt;br&gt;
enum cases, but not to the scalar values they stand for. &lt;br&gt;
&lt;code&gt;Status::Success === 'success'&lt;/code&gt; is always false. So the moment your &lt;br&gt;
data is actually a scalar, a string from &lt;code&gt;json_decode&lt;/code&gt;, a value in an &lt;br&gt;
associative array, a column from the database, the enum case is no &lt;br&gt;
longer interchangeable with it; you have to map back and forth with &lt;br&gt;
&lt;code&gt;-&amp;gt;value&lt;/code&gt; and &lt;code&gt;::from()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;That is the case literal types are really aimed at, and it is clearest &lt;br&gt;
with array shapes (which I have started working on and would put in &lt;br&gt;
future scope). Consider typing a decoded JSON response:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public abstract function getResponse(): ['status' =&amp;gt; 'success' |
'error', 'message' =&amp;gt; null | string, 'data' =&amp;gt; null | array, ...];
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The values here are genuinely scalars on the wire. A &lt;code&gt;status&lt;/code&gt; field &lt;br&gt;
that is &lt;code&gt;&amp;quot;success&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;error&amp;quot;&lt;/code&gt; is a discriminated union you can type &lt;br&gt;
exactly, and it round-trips through &lt;code&gt;json_encode&lt;/code&gt; / &lt;code&gt;json_decode&lt;/code&gt; &lt;br&gt;
untouched. This is everywhere in practice: tagged event payloads &lt;br&gt;
(&lt;code&gt;{&amp;quot;type&amp;quot;: &amp;quot;created&amp;quot; | &amp;quot;updated&amp;quot; | &amp;quot;deleted&amp;quot;}&lt;/code&gt;), result envelopes &lt;br&gt;
(&lt;code&gt;{&amp;quot;ok&amp;quot;: true, ...}&lt;/code&gt; vs &lt;code&gt;{&amp;quot;ok&amp;quot;: false, &amp;quot;error&amp;quot;: string}&lt;/code&gt;), open/closed &lt;br&gt;
flags, mode strings. Modelling these with enums means converting every &lt;br&gt;
field on the way in and on the way out, even though the data never &lt;br&gt;
stops being a plain string.&lt;/p&gt;
&lt;p&gt;So I see them covering different ground: enums for named, reusable, &lt;br&gt;
behaviour-carrying sets; literal types for describing scalar data that &lt;br&gt;
already exists in its raw form, particularly structured payloads like &lt;br&gt;
JSON.&lt;/p&gt;
</description><guid>CAFyg4HjYsBg7NzACP1rOK_HNLUAM12S-_qZzX1Dq4hmAZBooFQ@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 19:49:06 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131299</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I'd like to start the discussion on a new RFC adding literal scalar &lt;br&gt;
types to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/literal_scalar_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/literal_scalar_types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/22314" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22314&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have given the RFC a quick first review pass and would suggest to &lt;br&gt;
leave out support for float literals. From a conceptual perspective &lt;br&gt;
floats are much closer to being continuous values than they are to &lt;br&gt;
discrete values and picking individual values from a continuous range is &lt;br&gt;
typically not all that useful.&lt;/p&gt;
&lt;p&gt;Support for floats is also going to invite the usual confusion about &lt;br&gt;
implicit rounding:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; function tenths(
     0.0|0.1|0.2|0.3|0.4|0.5|0.6|0.7|0.8|0.9 $tenth
 ): void { var_dump($tenth); }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where &lt;code&gt;tenths(0.1 + 0.2)&lt;/code&gt; will result in a TypeError. The RFC is also &lt;br&gt;
unclear what values are valid floating point literals. As an example, is &lt;br&gt;
&lt;code&gt;4e3&lt;/code&gt; a valid float literal? Is &lt;code&gt;NAN&lt;/code&gt; a valid float literal?&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Tim,&lt;/p&gt;
&lt;p&gt;I think I might agree here, and others have raised the same concern on &lt;br&gt;
Discord. Dropping float literals for now simplifies the RFC, so I am &lt;br&gt;
inclined to do that, though I would like to hear what others think &lt;br&gt;
before removing them.&lt;/p&gt;
&lt;p&gt;For what it is worth, I am personally fine with &lt;code&gt;tenths(0.1 + 0.2)&lt;/code&gt; &lt;br&gt;
failing to match &lt;code&gt;0.3&lt;/code&gt;. This is not new behaviour: &lt;code&gt;0.1 + 0.2 == 0.3&lt;/code&gt; &lt;br&gt;
is already false, and a &lt;code&gt;match (0.1 + 0.2)&lt;/code&gt; already skips a &lt;code&gt;0.3&lt;/code&gt; arm &lt;br&gt;
for exactly the same reason. So a literal float type behaves &lt;br&gt;
consistently with comparison and &lt;code&gt;match&lt;/code&gt;, rather than introducing a &lt;br&gt;
new surprise.&lt;/p&gt;
&lt;p&gt;On your concrete questions: &lt;code&gt;4e3&lt;/code&gt; is a valid float literal and works &lt;br&gt;
today; it normalizes to &lt;code&gt;4000.0&lt;/code&gt; (the type also stringifies as &lt;br&gt;
&lt;code&gt;4000.0&lt;/code&gt;). &lt;code&gt;NAN&lt;/code&gt; and &lt;code&gt;INF&lt;/code&gt;, on the other hand, are not literals but &lt;br&gt;
constant identifiers that go through constant resolution. They are out &lt;br&gt;
of scope for the same reason &lt;code&gt;FOO&lt;/code&gt; is above: &lt;code&gt;NAN $foo&lt;/code&gt; could just as &lt;br&gt;
well mean a class named &lt;code&gt;NAN&lt;/code&gt;.&lt;/p&gt;
</description><guid>CAFyg4HgD=NOnxFOw1KTk-YQZp8N78fEAv+15tpoHiTF828Tj4Q@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 19:45:25 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131298</link><description>&lt;blockquote&gt;
&lt;p&gt;Den 15. jun. 2026 kl. 19.23 skrev Sarina Corrigan &lt;a href="mailto:sarina.corrigan@gmail.com"&gt;sarina.corrigan@gmail.com&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;﻿ &lt;br&gt;
It may be worth mentioning that within the Pattern Matching RFC future scope, and mentioned a couple times within the discussion thread for the RFC, there is a similar proposal that would allow for this without using specific literal types.&lt;/p&gt;
&lt;p&gt;It's outlined in &lt;a href="https://github.com/Crell/php-rfcs/blob/master/pattern-matching/future.md" rel="nofollow" target="_blank"&gt;https://github.com/Crell/php-rfcs/blob/master/pattern-matching/future.md&lt;/a&gt; under &amp;quot;Parameter or return guards&amp;quot;&lt;/p&gt;
&lt;p&gt;It would allow for:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function setLogLevel (string $level is 'debug' | 'info' | 'warning' | 'error'): void {}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Of course, I don't think that a potential future scope of an in-draft RFC is reason to dismiss a more direct implementation of literal scalar types, but it may be useful to compare other ways we could achieve the same functionality. I personally find pattern matching within parameter/return types more versatile while keeping direct typing system more simplified. Specifically for a range feature that Ben Ramsey brought up, pattern matching for parameters seems much more appropriate.&lt;/p&gt;
&lt;p&gt;All that being said, I would gladly welcome literal scalar types.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hello Internals,&lt;/p&gt;
&lt;p&gt;I'd like to start the discussion on a new RFC adding literal scalar &lt;br&gt;
types to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/literal_scalar_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/literal_scalar_types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/22314" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22314&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Seifeddine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi, &lt;br&gt;
This sounds very promising. But I would be confused about receiving a TypeError when just the value of the parameter is wrong.&lt;/p&gt;
&lt;p&gt;As described in the RFC if I send 4 to a parameter that could only be 1, 2 or 3. I would expect a TypeError if I sent “abc” ?&lt;/p&gt;
&lt;p&gt;Kind regards &lt;br&gt;
Lars Nielsen&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Lars,&lt;/p&gt;
&lt;p&gt;I think the confusion comes from treating &amp;quot;type&amp;quot; and &amp;quot;value&amp;quot; as two &lt;br&gt;
separate things, which is the usual mental model. Literal scalar types &lt;br&gt;
deliberately blur that line: each value is itself a type, a unit type &lt;br&gt;
containing exactly one value.&lt;/p&gt;
&lt;p&gt;So &lt;code&gt;1|2|3&lt;/code&gt; is not &amp;quot;an int that happens to be restricted&amp;quot;, it is the &lt;br&gt;
union of three unit types &lt;code&gt;1&lt;/code&gt;, &lt;code&gt;2&lt;/code&gt; and &lt;code&gt;3&lt;/code&gt;. Under that view, both &lt;code&gt;4&lt;/code&gt; &lt;br&gt;
and &lt;code&gt;&amp;quot;abc&amp;quot;&lt;/code&gt; fail for the same reason: neither is a member of the &lt;br&gt;
declared type. There is no separate &amp;quot;the value is wrong&amp;quot; category, it &lt;br&gt;
is all type membership, so a &lt;code&gt;TypeError&lt;/code&gt; is the consistent outcome.&lt;/p&gt;
&lt;p&gt;It is the same thing that already happens with the &lt;code&gt;true&lt;/code&gt; type today: &lt;br&gt;
passing &lt;code&gt;false&lt;/code&gt; to a &lt;code&gt;true&lt;/code&gt; parameter is a &lt;code&gt;TypeError&lt;/code&gt;, even though &lt;br&gt;
both are booleans.&lt;/p&gt;
</description><guid>CAFyg4HiCX51dWwd0ZTYuTead68w7SyE3fWvDm5JDNU0fUM7Y1w@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 19:42:54 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131297</link><description>&lt;p&gt;On Mon, 15 Jun 2026 at 18:20, Sarina Corrigan &lt;a href="mailto:sarina.corrigan@gmail.com"&gt;sarina.corrigan@gmail.com&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It may be worth mentioning that within the Pattern Matching RFC future &lt;br&gt;
scope, and mentioned a couple times within the discussion thread for the &lt;br&gt;
RFC, there is a similar proposal that would allow for this without using &lt;br&gt;
specific literal types.&lt;/p&gt;
&lt;p&gt;It's outlined in &lt;br&gt;
&lt;a href="https://github.com/Crell/php-rfcs/blob/master/pattern-matching/future.md" rel="nofollow" target="_blank"&gt;https://github.com/Crell/php-rfcs/blob/master/pattern-matching/future.md&lt;/a&gt; &lt;br&gt;
under &amp;quot;Parameter or return guards&amp;quot;&lt;/p&gt;
&lt;p&gt;It would allow for:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function setLogLevel (string $level is 'debug' | 'info' | 'warning' |
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;'error'): void {}&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;code&gt;
Of course, I don't think that a potential future scope of an in-draft RFC
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;is reason to dismiss a more direct implementation of literal scalar types, &lt;br&gt;
but it may be useful to compare other ways we could achieve the same &lt;br&gt;
functionality. I personally find pattern matching within parameter/return &lt;br&gt;
types more versatile while keeping direct typing system more simplified. &lt;br&gt;
Specifically for a range feature that Ben Ramsey brought up, pattern &lt;br&gt;
matching for parameters seems much more appropriate.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;All that being said, I would gladly welcome literal scalar types.&lt;/p&gt;
&lt;p&gt;On Sun, Jun 14, 2026, 21:24 Seifeddine Gmati &lt;a href="mailto:azjezz@carthage.software"&gt;azjezz@carthage.software&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hello Internals,&lt;/p&gt;
&lt;p&gt;I'd like to start the discussion on a new RFC adding literal scalar &lt;br&gt;
types to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/literal_scalar_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/literal_scalar_types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/22314" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22314&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Seifeddine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Sarina,&lt;/p&gt;
&lt;p&gt;Thanks for the pointer, that is a good read.&lt;/p&gt;
&lt;p&gt;I don't think literal scalar types conflict with the pattern matching &lt;br&gt;
future scope at all. The way I see it, a pattern is, or at least should be, &lt;br&gt;
a type. &lt;code&gt;$foo is Foo { x: 10 }&lt;/code&gt; is really asking &amp;quot;does &lt;code&gt;$foo&lt;/code&gt; have the type &lt;br&gt;
&lt;code&gt;Foo&lt;/code&gt; with &lt;code&gt;x&lt;/code&gt; equal to &lt;code&gt;10&lt;/code&gt;&amp;quot;, and I would happily see us later allow &lt;code&gt;Foo { x: 10 }&lt;/code&gt; as a type on its own. The one thing a pattern adds over a type &lt;br&gt;
is binding: capturing a value in place of a sub-type, e.g.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if ($foo is Foo { x: $x }) { /* $x is bound here */ }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which a plain type declaration cannot do.&lt;/p&gt;
&lt;p&gt;On the specific syntax in that document:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function setLogLevel(string $level is 'debug' | 'info' | 'warning' |
'error'): void {}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;reads as redundant to me. The &lt;code&gt;string&lt;/code&gt; contributes nothing once the value &lt;br&gt;
set is given, so with literal scalar types the same intent is simply:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function setLogLevel('debug' | 'info' | 'warning' | 'error' $level): void {}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So I see the two as complementary rather than competing: literal types &lt;br&gt;
provide the value-as-type building block, and pattern matching can build on &lt;br&gt;
top of it for binding and destructuring.&lt;/p&gt;
&lt;p&gt;Glad to hear you would welcome the feature.&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Seifeddine&lt;/p&gt;
</description><guid>CAFyg4HiJsdMw2YL5hf2u73OJLks1bqirDFV2vK+Oqs6h__7m5A@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 19:41:36 +0000</pubDate></item><item><title>[RFC] [Discussion] Serializable closures from constant expressions</title><link>https://externals.io/message/131296</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I'd like to open the discussion on a new RFC: &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/serializable_closures" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/serializable_closures&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Don't forget to link the discussion thread in the RFC. For your &lt;br&gt;
convenience: &lt;a href="https://news-web.php.net/php.internals/131198" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/131198&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As to the RFC itself: I think it might be useful to split this into two &lt;br&gt;
RFCs, similarly to how Volker and I split the initial support for &lt;br&gt;
Closures in const-expr into support for Closures and support for first &lt;br&gt;
class callables.&lt;/p&gt;
&lt;p&gt;Specifically I believe that the proposed serialization format is fragile &lt;br&gt;
and the stated security model, which I suspect heavily influenced the &lt;br&gt;
design of the serialization format, is probably overly cautious.&lt;/p&gt;
&lt;p&gt;I don't think it is a problem to make &lt;code&gt;unserialize()&lt;/code&gt; a Closure factory, &lt;br&gt;
because the created Closure is “inert”. Contrary to arbitrary object &lt;br&gt;
unserialization (which will immediately call the deserialization hooks &lt;br&gt;
and then later __destruct()), the Closure will not actually do anything &lt;br&gt;
unless it is called.&lt;/p&gt;
&lt;p&gt;If folks are able to unserialize arbitrary payloads - which is &lt;br&gt;
documented to be unsafe - they already have capabilities that are much &lt;br&gt;
more powerful than “creating Closures”.&lt;/p&gt;
&lt;p&gt;For first class callables specifically, there is a very obvious and &lt;br&gt;
stable identifier to use: The underlying function name.&lt;/p&gt;
&lt;p&gt;For regular Closures, I don't like how changing something unrelated &lt;br&gt;
(namely adding new Closures to a class) can change the meaning of the &lt;br&gt;
serialized data. This is not how serialization works right now: The &lt;br&gt;
value in question is in full control of its serialization format and is &lt;br&gt;
able to “gracefully” support existing serialized payloads using an old &lt;br&gt;
format within an unserialization hook (e.g. by including a version &lt;br&gt;
number field). This allows to e.g. keep serialized queue jobs working &lt;br&gt;
across deploys.&lt;/p&gt;
&lt;p&gt;As for the &lt;code&gt;var_export()&lt;/code&gt; in the future scope: I think adding support for &lt;br&gt;
first class callables to &lt;code&gt;var_export()&lt;/code&gt; would be a change that can just &lt;br&gt;
be done without an RFC. It might be a good first step that might already &lt;br&gt;
be helpful to your use case?&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>1922f3b3-22a8-4fc2-9da0-cbb7aefcf893@bastelstu.be</guid><pubDate>Mon, 15 Jun 2026 19:30:18 +0000</pubDate></item><item><title>[VOTE] [RFC] Bound-Erased Generic Types</title><link>https://externals.io/message/131295</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Voting is now open on the Bound-Erased Generic Types RFC, as announced &lt;br&gt;
in the Intent to Vote message earlier this week.&lt;/p&gt;
&lt;p&gt;The vote started on 2026-06-14 at 16:50 UTC and ends on 2026-06-28 at 17:00 UTC.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/bound_erased_generic_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/bound_erased_generic_types&lt;/a&gt; &lt;br&gt;
Discussion thread: &lt;a href="https://news-web.php.net/php.internals/130816" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/130816&lt;/a&gt; &lt;br&gt;
Implementation: &lt;a href="https://github.com/php/php-src/pull/21969" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/21969&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To my own surprise, I am voting yes on this proposal.&lt;/p&gt;
&lt;p&gt;I still believe that refied generics should be the goal. To that end, &lt;br&gt;
I think we should be able to merge this and in minor versions, fix &lt;br&gt;
&amp;quot;soundness&amp;quot; and implementation holes as &amp;quot;bug&amp;quot; fixes on that route. If &lt;br&gt;
internals can agree on this, and then the community can communicate &lt;br&gt;
this through education, promotion, documentation, etc, then this RFC &lt;br&gt;
is simply a useful stepping stone.&lt;/p&gt;
&lt;p&gt;This is based on my own experience playing with the RFC, which &lt;br&gt;
included reporting 2 bugs in the implementation on the RFC. To be &lt;br&gt;
honest, it's not too useful to me. I very quickly run up against some &lt;br&gt;
limitation when trying to build useful things. Most notably, we need &lt;br&gt;
to be able to define lower bounds (syntax pending, obviously):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;class Option&amp;lt;+A&amp;gt;
{
    // B &amp;gt;: A means B is an ancestor of A
    // Since all As are Bs, you can return the A here
    function get_or_default&amp;lt;B &amp;gt;: A&amp;gt;(Option $option, B $default): B
   {
       return $option-&amp;gt;has_some()
           ? $option-&amp;gt;get()
           : $default;
    }
    // todo: the rest of the implementation
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can't take &lt;code&gt;A $default&lt;/code&gt; and return &lt;code&gt;A&lt;/code&gt; because this violates the &lt;br&gt;
variance laws: a covariant type A cannot be used in parameter &lt;br&gt;
position. So alternatively you could solve this with &lt;code&gt;inout A $default&lt;/code&gt; or similar.&lt;/p&gt;
&lt;p&gt;Presumably this would work with the current proposal:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;class Option&amp;lt;+A&amp;gt; {
    public function getOrDefault&amp;lt;B&amp;gt;(B $default): A|B {
        return $this-&amp;gt;hasSome() ? $this-&amp;gt;get() : $default;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;The version with a lower bound says it returns an A or an ancestor of A. &lt;br&gt;
The version with the union type says it returns an A or a B, and &lt;br&gt;
there's no relation between A and B at all.&lt;/p&gt;
&lt;p&gt;They both allow correct code: you can correctly return an A or &lt;br&gt;
ancestor of A in either one. Only the version with the lower bound &lt;br&gt;
rejects incorrect code, though, and that's an important duty.&lt;/p&gt;
&lt;p&gt;But this is tangential to my main point: if we accept that we are &lt;br&gt;
moving towards fully reified generics, and this is only a stepping &lt;br&gt;
stone, and we document this widely and educate about it, then in &lt;br&gt;
future versions we can tighten from &amp;quot;bounds erased&amp;quot; to &amp;quot;fully &lt;br&gt;
reified.&amp;quot; Yes, there will still be breakages, but far, far fewer &lt;br&gt;
breakages. This should be tolerable.&lt;/p&gt;
&lt;p&gt;I don't want this RFC to be our final form: I only want it to be a &lt;br&gt;
stepping stone.&lt;/p&gt;
</description><guid>CAAKU0unqjKg1Ok1-Evh_oQU5U20Di+waLWXvf7cDHdj0sBGZHQ@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 19:21:45 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131294</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;describing APIs that already exist. &lt;code&gt;array_filter&lt;/code&gt;'s &lt;code&gt;$mode&lt;/code&gt; really &lt;br&gt;
accepts &lt;code&gt;0|1|2&lt;/code&gt;, but it's typed &lt;code&gt;int&lt;/code&gt; because that's all the type &lt;br&gt;
system can say today. we can't retype it as an enum without breaking &lt;br&gt;
every caller. a literal union lets the signature state the actual &lt;br&gt;
contract.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;We can retype this kind of API with enums.&lt;/p&gt;
&lt;p&gt;See the “Correctly name the rounding mode and make it an Enum” RFC &lt;br&gt;
(&lt;a href="https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum&lt;/a&gt;) &lt;br&gt;
for an example: We first widen the parameter to accept the enum so that &lt;br&gt;
folks can opt-in to the new API. At a later point we alias the constants &lt;br&gt;
to the corresponding enum cases and deprecate passing the integers and &lt;br&gt;
then we remove the support for the integers (and constants).&lt;/p&gt;
&lt;p&gt;Using literal types is going to result in a terrible user-experience, &lt;br&gt;
because the signature does not provide any hint as to which constants &lt;br&gt;
are supposed to be used with the API which means that the resulting &lt;br&gt;
error message is also useless to the user. Enums - or the existing &lt;br&gt;
manual validation - is much preferable here.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="2"&gt;
&lt;li&gt;ad-hoc / open value sets. for a library, &amp;quot;ascii&amp;quot;|&amp;quot;utf-8&amp;quot; would need &lt;br&gt;
its own named symbol ( &lt;code&gt;enum BorderStyle { case Ascii; case Utf8 }&lt;/code&gt;, a &lt;br&gt;
new file, an import ) for what is really two strings. and because an &lt;br&gt;
enum is a closed set, adding a third style later breaks any consumer &lt;br&gt;
that match-es over it without a default. widening the union on a &lt;br&gt;
parameter ( &amp;quot;ascii&amp;quot;|&amp;quot;utf-8&amp;quot;|&amp;quot;unicode&amp;quot; ) is contravariant, so it breaks &lt;br&gt;
nobody.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;The existing \RoundingMode enum is already intended to be a &lt;br&gt;
non-exhaustive (parameter-only) enum where users are expected to include &lt;br&gt;
a &lt;code&gt;default&lt;/code&gt; case in case new values are being added.&lt;/p&gt;
&lt;p&gt;I have a &lt;em&gt;very&lt;/em&gt; rough draft in &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/non_exhaustive_marker" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/non_exhaustive_marker&lt;/a&gt; to make this type of &lt;br&gt;
contract more explicit.&lt;/p&gt;
&lt;p&gt;Having an “own named symbol” for the allowed values is a benefit to me, &lt;br&gt;
because this makes it easy to reuse the list of allowed values in &lt;br&gt;
different locations without needing to resort to copy and paste, for &lt;br&gt;
example in decorators that just pass through the values without touching &lt;br&gt;
them.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol start="3"&gt;
&lt;li&gt;scalar interop. a literal value is the scalar, so it works as an &lt;br&gt;
array key, compares with ===, round-trips through json, etc. enum &lt;br&gt;
cases are objects and don't.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Enums can be compared with &lt;code&gt;===&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>759893f0-d23c-4b05-8c80-f974e9fabe4e@bastelstu.be</guid><pubDate>Mon, 15 Jun 2026 18:55:23 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131293</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I'd like to start the discussion on a new RFC adding literal scalar &lt;br&gt;
types to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/literal_scalar_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/literal_scalar_types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/22314" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22314&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have given the RFC a quick first review pass and would suggest to &lt;br&gt;
leave out support for float literals. From a conceptual perspective &lt;br&gt;
floats are much closer to being continuous values than they are to &lt;br&gt;
discrete values and picking individual values from a continuous range is &lt;br&gt;
typically not all that useful.&lt;/p&gt;
&lt;p&gt;Support for floats is also going to invite the usual confusion about &lt;br&gt;
implicit rounding:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; function tenths(
     0.0|0.1|0.2|0.3|0.4|0.5|0.6|0.7|0.8|0.9 $tenth
 ): void { var_dump($tenth); }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where &lt;code&gt;tenths(0.1 + 0.2)&lt;/code&gt; will result in a TypeError. The RFC is also &lt;br&gt;
unclear what values are valid floating point literals. As an example, is &lt;br&gt;
&lt;code&gt;4e3&lt;/code&gt; a valid float literal? Is &lt;code&gt;NAN&lt;/code&gt; a valid float literal?&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>eff9994b-db67-4f41-88f6-e584a32deff8@bastelstu.be</guid><pubDate>Mon, 15 Jun 2026 18:43:14 +0000</pubDate></item><item><title>[VOTE] [RFC] Bound-Erased Generic Types</title><link>https://externals.io/message/131292</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Voting is now open on the Bound-Erased Generic Types RFC, as announced &lt;br&gt;
in the Intent to Vote message earlier this week.&lt;/p&gt;
&lt;p&gt;The vote started on 2026-06-14 at 16:50 UTC and ends on 2026-06-28 at 17:00 UTC.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/bound_erased_generic_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/bound_erased_generic_types&lt;/a&gt; &lt;br&gt;
Discussion thread: &lt;a href="https://news-web.php.net/php.internals/130816" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/130816&lt;/a&gt; &lt;br&gt;
Implementation: &lt;a href="https://github.com/php/php-src/pull/21969" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/21969&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To my own surprise, I am voting yes on this proposal.&lt;/p&gt;
&lt;p&gt;I still believe that refied generics should be the goal. To that end, &lt;br&gt;
I think we should be able to merge this and in minor versions, fix &lt;br&gt;
&amp;quot;soundness&amp;quot; and implementation holes as &amp;quot;bug&amp;quot; fixes on that route. If &lt;br&gt;
internals can agree on this, and then the community can communicate &lt;br&gt;
this through education, promotion, documentation, etc, then this RFC &lt;br&gt;
is simply a useful stepping stone.&lt;/p&gt;
&lt;p&gt;This is based on my own experience playing with the RFC, which &lt;br&gt;
included reporting 2 bugs in the implementation on the RFC. To be &lt;br&gt;
honest, it's not too useful to me. I very quickly run up against some &lt;br&gt;
limitation when trying to build useful things. Most notably, we need &lt;br&gt;
to be able to define lower bounds (syntax pending, obviously):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;class Option&amp;lt;+A&amp;gt;
{
    // B &amp;gt;: A means B is an ancestor of A
    // Since all As are Bs, you can return the A here
    function get_or_default&amp;lt;B &amp;gt;: A&amp;gt;(Option $option, B $default): B
   {
       return $option-&amp;gt;has_some()
           ? $option-&amp;gt;get()
           : $default;
    }
    // todo: the rest of the implementation
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can't take &lt;code&gt;A $default&lt;/code&gt; and return &lt;code&gt;A&lt;/code&gt; because this violates the &lt;br&gt;
variance laws: a covariant type A cannot be used in parameter &lt;br&gt;
position. So alternatively you could solve this with &lt;code&gt;inout A $default&lt;/code&gt; or similar.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Presumably this would work with the current proposal:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;class Option&amp;lt;+A&amp;gt; {
    public function getOrDefault&amp;lt;B&amp;gt;(B $default): A|B {
        return $this-&amp;gt;hasSome() ? $this-&amp;gt;get() : $default;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hack also has &lt;code&gt;super&lt;/code&gt; type constraints: &lt;a href="https://hhvm.com/blog/9215/covariance-contravariance-and-super-type-constraints" rel="nofollow" target="_blank"&gt;https://hhvm.com/blog/9215/covariance-contravariance-and-super-type-constraints&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It wouldn’t actually do anything though…&lt;/p&gt;
&lt;p&gt;— Rob&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sorry. Sent before I was finished writing.&lt;/p&gt;
&lt;p&gt;It wouldn’t actually do anything though…&lt;/p&gt;
&lt;p&gt;Both are “correct” in erased generics. You’d receive no error or feedback what you’d written was “wrong” or “broken”. In both examples, types reduce to mixed.&lt;/p&gt;
&lt;p&gt;— Rob&lt;/p&gt;
</description><guid>d2762330-812b-48e9-8861-c3e0b801399a@app.fastmail.com</guid><pubDate>Mon, 15 Jun 2026 18:31:57 +0000</pubDate></item><item><title>[VOTE] Deprecate returning values from __construct() and __destruct()</title><link>https://externals.io/message/131291</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Tim, sorry if I missed it in the discussion and RFC: is there any plan &lt;br&gt;
to allow declaring &lt;code&gt;function __construct(): void&lt;/code&gt; at the same time? &lt;br&gt;
Since:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;We are going to actively enforce that they don't return anything,&lt;/li&gt;
&lt;li&gt;and returning &lt;code&gt;void&lt;/code&gt; is the correct declaration for such functions &lt;br&gt;
(and I would argue &lt;code&gt;null&lt;/code&gt; as well but I don't care too much about &lt;br&gt;
this, I debated mentioning it at all because it's a bit off in the &lt;br&gt;
weeds),&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;doesn't it make sense to also allow declaring a void return at the same time?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Allowing an explicit &lt;code&gt;: void&lt;/code&gt; return is not part of the RFC.&lt;/p&gt;
&lt;p&gt;I intentionally focused on the deprecation to keep the RFC focused on &lt;br&gt;
the “important bits”, namely removing this confusing behavior.&lt;/p&gt;
&lt;p&gt;That's also why &lt;code&gt;__clone()&lt;/code&gt; is intentionally left to future scope, since &lt;br&gt;
the situation there is slightly different. It definitely makes sense to &lt;br&gt;
me to align &lt;code&gt;__clone()&lt;/code&gt; with &lt;code&gt;__construct()&lt;/code&gt; in one way or another, &lt;br&gt;
though, since they effectively only differ in s/new/clone/ for their &lt;br&gt;
intended use.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>9bb3591b-09c6-4249-ad3a-b98710e1eeee@bastelstu.be</guid><pubDate>Mon, 15 Jun 2026 18:31:34 +0000</pubDate></item><item><title>[VOTE] [RFC] Bound-Erased Generic Types</title><link>https://externals.io/message/131290</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Voting is now open on the Bound-Erased Generic Types RFC, as announced &lt;br&gt;
in the Intent to Vote message earlier this week.&lt;/p&gt;
&lt;p&gt;The vote started on 2026-06-14 at 16:50 UTC and ends on 2026-06-28 at 17:00 UTC.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/bound_erased_generic_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/bound_erased_generic_types&lt;/a&gt; &lt;br&gt;
Discussion thread: &lt;a href="https://news-web.php.net/php.internals/130816" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/130816&lt;/a&gt; &lt;br&gt;
Implementation: &lt;a href="https://github.com/php/php-src/pull/21969" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/21969&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To my own surprise, I am voting yes on this proposal.&lt;/p&gt;
&lt;p&gt;I still believe that refied generics should be the goal. To that end, &lt;br&gt;
I think we should be able to merge this and in minor versions, fix &lt;br&gt;
&amp;quot;soundness&amp;quot; and implementation holes as &amp;quot;bug&amp;quot; fixes on that route. If &lt;br&gt;
internals can agree on this, and then the community can communicate &lt;br&gt;
this through education, promotion, documentation, etc, then this RFC &lt;br&gt;
is simply a useful stepping stone.&lt;/p&gt;
&lt;p&gt;This is based on my own experience playing with the RFC, which &lt;br&gt;
included reporting 2 bugs in the implementation on the RFC. To be &lt;br&gt;
honest, it's not too useful to me. I very quickly run up against some &lt;br&gt;
limitation when trying to build useful things. Most notably, we need &lt;br&gt;
to be able to define lower bounds (syntax pending, obviously):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;class Option&amp;lt;+A&amp;gt;
{
    // B &amp;gt;: A means B is an ancestor of A
    // Since all As are Bs, you can return the A here
    function get_or_default&amp;lt;B &amp;gt;: A&amp;gt;(Option $option, B $default): B
   {
       return $option-&amp;gt;has_some()
           ? $option-&amp;gt;get()
           : $default;
    }
    // todo: the rest of the implementation
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can't take &lt;code&gt;A $default&lt;/code&gt; and return &lt;code&gt;A&lt;/code&gt; because this violates the &lt;br&gt;
variance laws: a covariant type A cannot be used in parameter &lt;br&gt;
position. So alternatively you could solve this with &lt;code&gt;inout A $default&lt;/code&gt; or similar.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Presumably this would work with the current proposal:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;class Option&amp;lt;+A&amp;gt; {
    public function getOrDefault&amp;lt;B&amp;gt;(B $default): A|B {
        return $this-&amp;gt;hasSome() ? $this-&amp;gt;get() : $default;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hack also has &lt;code&gt;super&lt;/code&gt; type constraints: &lt;a href="https://hhvm.com/blog/9215/covariance-contravariance-and-super-type-constraints" rel="nofollow" target="_blank"&gt;https://hhvm.com/blog/9215/covariance-contravariance-and-super-type-constraints&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It wouldn’t actually do anything though…&lt;/p&gt;
&lt;p&gt;— Rob&lt;/p&gt;
</description><guid>ec1e88fd-af1a-4950-ae8c-9a7d7800ee4a@app.fastmail.com</guid><pubDate>Mon, 15 Jun 2026 18:27:14 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131289</link><description>&lt;blockquote&gt;
&lt;p&gt;Den 15. jun. 2026 kl. 19.23 skrev Sarina Corrigan &lt;a href="mailto:sarina.corrigan@gmail.com"&gt;sarina.corrigan@gmail.com&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;﻿ &lt;br&gt;
It may be worth mentioning that within the Pattern Matching RFC future scope, and mentioned a couple times within the discussion thread for the RFC, there is a similar proposal that would allow for this without using specific literal types.&lt;/p&gt;
&lt;p&gt;It's outlined in &lt;a href="https://github.com/Crell/php-rfcs/blob/master/pattern-matching/future.md" rel="nofollow" target="_blank"&gt;https://github.com/Crell/php-rfcs/blob/master/pattern-matching/future.md&lt;/a&gt; under &amp;quot;Parameter or return guards&amp;quot;&lt;/p&gt;
&lt;p&gt;It would allow for:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function setLogLevel (string $level is 'debug' | 'info' | 'warning' | 'error'): void {}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Of course, I don't think that a potential future scope of an in-draft RFC is reason to dismiss a more direct implementation of literal scalar types, but it may be useful to compare other ways we could achieve the same functionality. I personally find pattern matching within parameter/return types more versatile while keeping direct typing system more simplified. Specifically for a range feature that Ben Ramsey brought up, pattern matching for parameters seems much more appropriate.&lt;/p&gt;
&lt;p&gt;All that being said, I would gladly welcome literal scalar types.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hello Internals,&lt;/p&gt;
&lt;p&gt;I'd like to start the discussion on a new RFC adding literal scalar &lt;br&gt;
types to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/literal_scalar_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/literal_scalar_types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/22314" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22314&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Seifeddine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi, &lt;br&gt;
This sounds very promising. But I would be confused about receiving a TypeError when just the value of the parameter is wrong.&lt;/p&gt;
&lt;p&gt;As described in the RFC if I send 4 to a parameter that could only be 1, 2 or 3. I would expect a TypeError if I sent “abc” ?&lt;/p&gt;
&lt;p&gt;Kind regards &lt;br&gt;
Lars Nielsen&lt;/p&gt;
</description><guid>B491891B-CFB3-4C55-B061-B120906226F6@lfweb.dk</guid><pubDate>Mon, 15 Jun 2026 18:25:04 +0000</pubDate></item><item><title>[VOTE] [RFC] Bound-Erased Generic Types</title><link>https://externals.io/message/131288</link><description>&lt;p&gt;On Mon, 15 Jun 2026 at 12:28, Levi Morrison &lt;a href="mailto:levi.morrison@datadoghq.com"&gt;levi.morrison@datadoghq.com&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Voting is now open on the Bound-Erased Generic Types RFC, as announced &lt;br&gt;
in the Intent to Vote message earlier this week.&lt;/p&gt;
&lt;p&gt;The vote started on 2026-06-14 at 16:50 UTC and ends on 2026-06-28 at &lt;br&gt;
17:00 UTC.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/bound_erased_generic_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/bound_erased_generic_types&lt;/a&gt; &lt;br&gt;
Discussion thread: &lt;a href="https://news-web.php.net/php.internals/130816" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/130816&lt;/a&gt; &lt;br&gt;
Implementation: &lt;a href="https://github.com/php/php-src/pull/21969" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/21969&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To my own surprise, I am voting yes on this proposal.&lt;/p&gt;
&lt;p&gt;I still believe that refied generics should be the goal. To that end, &lt;br&gt;
I think we should be able to merge this and in minor versions, fix &lt;br&gt;
&amp;quot;soundness&amp;quot; and implementation holes as &amp;quot;bug&amp;quot; fixes on that route. If &lt;br&gt;
internals can agree on this, and then the community can communicate &lt;br&gt;
this through education, promotion, documentation, etc, then this RFC &lt;br&gt;
is simply a useful stepping stone.&lt;/p&gt;
&lt;p&gt;This is based on my own experience playing with the RFC, which &lt;br&gt;
included reporting 2 bugs in the implementation on the RFC. To be &lt;br&gt;
honest, it's not too useful to me. I very quickly run up against some &lt;br&gt;
limitation when trying to build useful things. Most notably, we need &lt;br&gt;
to be able to define lower bounds (syntax pending, obviously):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;class Option&amp;lt;+A&amp;gt;
{
    // B &amp;gt;: A means B is an ancestor of A
    // Since all As are Bs, you can return the A here
    function get_or_default&amp;lt;B &amp;gt;: A&amp;gt;(Option $option, B $default): B
   {
       return $option-&amp;gt;has_some()
           ? $option-&amp;gt;get()
           : $default;
    }
    // todo: the rest of the implementation
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can't take &lt;code&gt;A $default&lt;/code&gt; and return &lt;code&gt;A&lt;/code&gt; because this violates the &lt;br&gt;
variance laws: a covariant type A cannot be used in parameter &lt;br&gt;
position. So alternatively you could solve this with &lt;code&gt;inout A $default&lt;/code&gt; or similar.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Presumably this would work with the current proposal:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;class Option&amp;lt;+A&amp;gt; {
    public function getOrDefault&amp;lt;B&amp;gt;(B $default): A|B {
        return $this-&amp;gt;hasSome() ? $this-&amp;gt;get() : $default;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hack also has &lt;code&gt;super&lt;/code&gt; type constraints: &lt;br&gt;
&lt;a href="https://hhvm.com/blog/9215/covariance-contravariance-and-super-type-constraints" rel="nofollow" target="_blank"&gt;https://hhvm.com/blog/9215/covariance-contravariance-and-super-type-constraints&lt;/a&gt;&lt;/p&gt;
</description><guid>CAKuGYLRKQyrgS7HHpcjpkMZkTDEf_R-vu+4dGNxf4ume-UVB5g@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 18:22:04 +0000</pubDate></item><item><title>[Discussion] Proposal: get_favicon() helper function</title><link>https://externals.io/message/131287</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;My name is Sepehr and I would like to propose a small helper function for &lt;br&gt;
PHP that extracts the favicon URL of a given page.&lt;/p&gt;
&lt;p&gt;The function takes a URL, fetches the HTML, and returns the favicon URL as &lt;br&gt;
a string.&lt;/p&gt;
&lt;p&gt;Possible signature:&lt;/p&gt;
&lt;p&gt;get_favicon(string $url): ?string&lt;/p&gt;
&lt;p&gt;The function would scan the HTML for common favicon declarations such as:&lt;/p&gt;
&amp;lt;link rel=“icon” href=“…”&amp;gt;
&amp;lt;link rel=“shortcut icon” href=“…”&amp;gt;
&amp;lt;link rel=“apple-touch-icon” href=“…”&amp;gt;
&lt;p&gt;If a favicon link is found, the function returns the URL. If not, it &lt;br&gt;
returns null.&lt;/p&gt;
&lt;p&gt;The goal is to provide a simple built-in helper for a common task in web &lt;br&gt;
utilities and crawlers.&lt;/p&gt;
&lt;p&gt;I would appreciate feedback on this. If it seems reasonable, I’d like to &lt;br&gt;
draft an RFC and request a wiki account to create the proposal page.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Sepehr&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Why is that a common thing so much that it needs to be part of the &lt;br&gt;
language? Why can't you do it with existing Dom tools? Why does it have to &lt;br&gt;
return null? Why does it take URL as an argument and simingly also return &lt;br&gt;
it as well? Where does it fetch the HTML from? Does it do a http request &lt;br&gt;
too?&lt;/p&gt;
</description><guid>CAGBsUrePXwMfhyOCiqxmpSzPbhf9jkMJ05rm+5-jFYdaEcfi-g@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 17:22:26 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131286</link><description>&lt;p&gt;It may be worth mentioning that within the Pattern Matching RFC future &lt;br&gt;
scope, and mentioned a couple times within the discussion thread for the &lt;br&gt;
RFC, there is a similar proposal that would allow for this without using &lt;br&gt;
specific literal types.&lt;/p&gt;
&lt;p&gt;It's outlined in &lt;br&gt;
&lt;a href="https://github.com/Crell/php-rfcs/blob/master/pattern-matching/future.md" rel="nofollow" target="_blank"&gt;https://github.com/Crell/php-rfcs/blob/master/pattern-matching/future.md&lt;/a&gt; &lt;br&gt;
under &amp;quot;Parameter or return guards&amp;quot;&lt;/p&gt;
&lt;p&gt;It would allow for:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function setLogLevel (string $level is 'debug' | 'info' | 'warning' |
'error'): void {}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Of course, I don't think that a potential future scope of an in-draft RFC &lt;br&gt;
is reason to dismiss a more direct implementation of literal scalar types, &lt;br&gt;
but it may be useful to compare other ways we could achieve the same &lt;br&gt;
functionality. I personally find pattern matching within parameter/return &lt;br&gt;
types more versatile while keeping direct typing system more simplified. &lt;br&gt;
Specifically for a range feature that Ben Ramsey brought up, pattern &lt;br&gt;
matching for parameters seems much more appropriate.&lt;/p&gt;
&lt;p&gt;All that being said, I would gladly welcome literal scalar types.&lt;/p&gt;
&lt;p&gt;On Sun, Jun 14, 2026, 21:24 Seifeddine Gmati &lt;a href="mailto:azjezz@carthage.software"&gt;azjezz@carthage.software&lt;/a&gt; &lt;br&gt;
wrote:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hello Internals,&lt;/p&gt;
&lt;p&gt;I'd like to start the discussion on a new RFC adding literal scalar &lt;br&gt;
types to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/literal_scalar_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/literal_scalar_types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/22314" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22314&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Seifeddine.&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>CAKqZJswTkyf+Kymo5LTnjNqtu+YoiT0CeEw-03xfj_kKNK5pzA@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 17:19:54 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131285</link><description>&lt;p&gt;Hi Jordi,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Does the RFC allow referencing constants in type positions, or only raw &lt;br&gt;
literal values?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function foo(STATUS_ACTIVE|STATUS_INACTIVE $sort): void {}
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Regarding your first point, referencing constants in type positions is not &lt;br&gt;
supported. This RFC focuses specifically on scalar literals. A constant &lt;br&gt;
access is not a literal itself, and allowing something like &lt;code&gt;FOO&lt;/code&gt; in a type &lt;br&gt;
position could cause ambiguity; at first sight, it's unclear whether it &lt;br&gt;
refers to a class name or a constant. While casing might suggest one or the &lt;br&gt;
other to a human, PHP allows both classes and constants to use any casing &lt;br&gt;
style, which could lead to confusion.&lt;/p&gt;
&lt;p&gt;This would also be a BC break, as the following is currently permitted in &lt;br&gt;
PHP:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;const Foo = 1;
class Foo {}

function bar(Foo $hello): void {}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If &lt;code&gt;Foo&lt;/code&gt; were changed to mean &lt;code&gt;1&lt;/code&gt; instead of an instance of &lt;code&gt;Foo&lt;/code&gt; depending &lt;br&gt;
on the surrounding context, this would break existing applications.&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&lt;code&gt;What about enum values? For example:

function bar(Status::Active-&amp;gt;value $status): void {}
// or simply as
function bar(Status::Active $status): void {}
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;For the second point, using enum values is also out of scope. &lt;br&gt;
&lt;code&gt;Status::Active-&amp;gt;value&lt;/code&gt; is a runtime expression, not a literal: the engine &lt;br&gt;
would have to confirm that &lt;code&gt;Status&lt;/code&gt; is an enum, that the case exists, and &lt;br&gt;
that it is backed before reading &lt;code&gt;-&amp;gt;value&lt;/code&gt;. And &lt;code&gt;Status::Active&lt;/code&gt; by itself &lt;br&gt;
is an object, a single enum case, which would be a single-case type, a &lt;br&gt;
separate feature from scalar literals. In both situations, requiring the &lt;br&gt;
enum type itself is usually the better fit.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Also, I'm not really a fan of mixing literal types with unions.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function foo(int|'bar' $param): void {}
&lt;/code&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;Finally, regarding mixing literal types with wider types like &lt;code&gt;int|'bar'&lt;/code&gt;, &lt;br&gt;
this is supported by design. I believe restricting what may appear in a &lt;br&gt;
union is the wrong approach; PHP should treat types uniformly, with &lt;br&gt;
exceptions only for types that aren't value types and so are meaningless in &lt;br&gt;
a union (&lt;code&gt;void&lt;/code&gt;, &lt;code&gt;never&lt;/code&gt;) or that are redundant (&lt;code&gt;mixed|T&lt;/code&gt;, or a literal &lt;br&gt;
already covered by its base type like &lt;code&gt;int|1&lt;/code&gt;). If a union like &lt;br&gt;
&lt;code&gt;float|'cold'|'hot'&lt;/code&gt; lets a user express a real requirement for their API, &lt;br&gt;
the type system should allow it.&lt;/p&gt;
&lt;p&gt;Cheers, &lt;br&gt;
Seifeddine.&lt;/p&gt;
</description><guid>CAFyg4Hg7fYTLuXaUD=+wO-zjFGQqLXWHt5Xz+3z9PaAqtdKwZQ@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 16:44:16 +0000</pubDate></item><item><title>[VOTE] [RFC] Bound-Erased Generic Types</title><link>https://externals.io/message/131284</link><description>&lt;blockquote&gt;
&lt;p&gt;Voting is now open on the Bound-Erased Generic Types RFC, as announced &lt;br&gt;
in the Intent to Vote message earlier this week.&lt;/p&gt;
&lt;p&gt;The vote started on 2026-06-14 at 16:50 UTC and ends on 2026-06-28 at 17:00 UTC.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/bound_erased_generic_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/bound_erased_generic_types&lt;/a&gt; &lt;br&gt;
Discussion thread: &lt;a href="https://news-web.php.net/php.internals/130816" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/130816&lt;/a&gt; &lt;br&gt;
Implementation: &lt;a href="https://github.com/php/php-src/pull/21969" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/21969&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To my own surprise, I am voting yes on this proposal.&lt;/p&gt;
&lt;p&gt;I still believe that refied generics should be the goal. To that end, &lt;br&gt;
I think we should be able to merge this and in minor versions, fix &lt;br&gt;
&amp;quot;soundness&amp;quot; and implementation holes as &amp;quot;bug&amp;quot; fixes on that route. If &lt;br&gt;
internals can agree on this, and then the community can communicate &lt;br&gt;
this through education, promotion, documentation, etc, then this RFC &lt;br&gt;
is simply a useful stepping stone.&lt;/p&gt;
&lt;p&gt;This is based on my own experience playing with the RFC, which &lt;br&gt;
included reporting 2 bugs in the implementation on the RFC. To be &lt;br&gt;
honest, it's not too useful to me. I very quickly run up against some &lt;br&gt;
limitation when trying to build useful things. Most notably, we need &lt;br&gt;
to be able to define lower bounds (syntax pending, obviously):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;class Option&amp;lt;+A&amp;gt;
{
    // B &amp;gt;: A means B is an ancestor of A
    // Since all As are Bs, you can return the A here
    function get_or_default&amp;lt;B &amp;gt;: A&amp;gt;(Option $option, B $default): B
   {
       return $option-&amp;gt;has_some()
           ? $option-&amp;gt;get()
           : $default;
    }
    // todo: the rest of the implementation
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can't take &lt;code&gt;A $default&lt;/code&gt; and return &lt;code&gt;A&lt;/code&gt; because this violates the &lt;br&gt;
variance laws: a covariant type A cannot be used in parameter &lt;br&gt;
position. So alternatively you could solve this with &lt;code&gt;inout A $default&lt;/code&gt; or similar.&lt;/p&gt;
&lt;p&gt;This lower bound thing inevitably happens when I try working with &lt;br&gt;
iterators too. But if the RFC passed, I would hope we could pass such &lt;br&gt;
additional things without too much controversy.&lt;/p&gt;
</description><guid>CAAKU0ukF=6oWkubZwPhKzfKPMLUx4_+AnU1zowUq16si7Mk2FQ@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 16:26:00 +0000</pubDate></item><item><title>[Discussion] Proposal: get_favicon() helper function</title><link>https://externals.io/message/131283</link><description></description><guid>91ede0bc-1bc5-4efe-aa82-5f878ff4a77d@email.android.com</guid><pubDate>Mon, 15 Jun 2026 16:09:01 +0000</pubDate></item><item><title>[Discussion] Proposal: get_favicon() helper function</title><link>https://externals.io/message/131282</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;My name is Sepehr and I would like to propose a small helper function for &lt;br&gt;
PHP that extracts the favicon URL of a given page.&lt;/p&gt;
&lt;p&gt;The function takes a URL, fetches the HTML, and returns the favicon URL as &lt;br&gt;
a string.&lt;/p&gt;
&lt;p&gt;Possible signature:&lt;/p&gt;
&lt;p&gt;get_favicon(string $url): ?string&lt;/p&gt;
&lt;p&gt;The function would scan the HTML for common favicon declarations such as:&lt;/p&gt;
&amp;lt;link rel=“icon” href=“…”&amp;gt;
&amp;lt;link rel=“shortcut icon” href=“…”&amp;gt;
&amp;lt;link rel=“apple-touch-icon” href=“…”&amp;gt;
&lt;p&gt;If a favicon link is found, the function returns the URL. If not, it &lt;br&gt;
returns null.&lt;/p&gt;
&lt;p&gt;The goal is to provide a simple built-in helper for a common task in web &lt;br&gt;
utilities and crawlers.&lt;/p&gt;
&lt;p&gt;I would appreciate feedback on this. If it seems reasonable, I’d like to &lt;br&gt;
draft an RFC and request a wiki account to create the proposal page.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Sepehr&lt;/p&gt;
</description><guid>CA+Jcf5s13BMrU6pY6+z4pm_pBcQKjgysVRowDKEWKZAGwgyisQ@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 15:35:15 +0000</pubDate></item><item><title>[RFC] Working Groups</title><link>https://externals.io/message/131281</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Anything that doesn't need special powers can more efficiently be organized without the overhead of the initial RFC, as can also be seen by The PHP Foundation planning to launch 6 “special interest groups” in the remainder of 2026 without needing to involve the PHP project:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://thephp.foundation/blog/2026/06/11/integrating-community-" rel="nofollow" target="_blank"&gt;https://thephp.foundation/blog/2026/06/11/integrating-community-&lt;/a&gt; feedback-into-foundation-strategy-part2/#community-special-interest-groups&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'm aware of the PHP Foundation special interest groups, and Elizabeth and I discussed them before I opened the Working Groups RFC for discussion. We agreed they do not cover the same ground as the Working Groups RFC. By design, the PHP Foundation SIGs have no operational or governance authority over the PHP Project. There can be cross-pollination and collaboration between the initiatives, but the SIGs are external, community-focused, interest groups, while PHP WGs are internal, PHP Project-focused, operational groups.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My 2cents in the form of questions (because I might have missed something):&lt;/p&gt;
&lt;p&gt;Since the PHPF's role is to support, help and discuss, then shouldn't &lt;br&gt;
PHPF operatives be excluded from voting on RFCs, whatever the involved &lt;br&gt;
WG? It would ensure that the PHP voters (aka &amp;quot;&lt;em&gt;The community that &lt;br&gt;
includes contributors and core team members&lt;/em&gt;&amp;quot;) can take decisions &lt;br&gt;
without the PHPF being able to intervene if there's a disagreement &lt;br&gt;
between the two groups, I guess...?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;quot;PHPF operatives&amp;quot; sounds very negative.  Bear in mind, the Foundation currently employs a majority of the people who really understand the PHP engine and how to maintain it.  Excluding them from voting would be.. project suicide.&lt;/p&gt;
&lt;p&gt;The Foundation has no vote.  The people who do half the work for PHP, who happen to work for the Foundation, have votes.  As they should.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;And similarly, shouldn't there be a mandatory consultation from the PHP &lt;br&gt;
community when the PHPF actually operates on something that impacts the &lt;br&gt;
community on non-RFC-mandatory-operations, like marketing, &lt;br&gt;
communication, etc.? I mean, if at some point the PHPF communicates on &lt;br&gt;
the web on something the PHP community would disagree with (concluded &lt;br&gt;
via a vote of whatever sort), shouldn't the PHPF, as a &amp;quot;consultative &lt;br&gt;
agency&amp;quot;, have to update their acts and productions to fit to the &lt;br&gt;
community's views? (that would solve parts of the issues with the &lt;br&gt;
recent hot discussions on a certain link to a certain platform on PHP's &lt;br&gt;
website, for example).&lt;/p&gt;
&lt;p&gt;All these questions are here because PHP has no official governance &lt;br&gt;
other than the (sometimes vaguely) designated &amp;quot;PHP Community&amp;quot;, and the &lt;br&gt;
PHPF's role, from what I understand, is mostly to &lt;em&gt;help the community &lt;br&gt;
to decide and act&lt;/em&gt; on PHP-related tasks, but &lt;em&gt;not directly decide nor &lt;br&gt;
act&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I might be off of some details, so feel free to correct me if I miss &lt;br&gt;
something, if I'm mistaking, or if I misunderstand certain roles or &lt;br&gt;
notions.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;From the Foundation's home page:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;The PHP Foundation is a collective of people and organizations relying on the PHP language. Its mission is to ensure the long-term prosperity of the PHP language.

The PHP Foundation focuses on providing financial support and guidance to PHP language developers to support its goals of improving the language for its users, providing high-quality maintenance, and improving the PHP language project to retain current contributors and to integrate new contributors.

The PHP Foundation aims to promote the public image of the PHP language in the interest of retaining existing and gaining new users and contributors.

Read our announcement for more details.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That's what the Foundation does and is for.&lt;/p&gt;
&lt;p&gt;It really seems like you're inventing problems that do not exist, and have no bearing on the project itself creating working groups.  That those WGs may overlap with the Foundation, both in goal and personnel, is a good thing in my mind.&lt;/p&gt;
&lt;p&gt;--Larry Garfield&lt;/p&gt;
</description><guid>0db1e4c6-fca5-40f1-93f6-1bf208ef629a@app.fastmail.com</guid><pubDate>Mon, 15 Jun 2026 15:20:15 +0000</pubDate></item><item><title>[VOTE] Deprecate returning values from __construct() and __destruct()</title><link>https://externals.io/message/131280</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I just opened the vote on “Deprecate returning values from __construct() &lt;br&gt;
and __destruct()”.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/deprecate-return-value-from-construct" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/deprecate-return-value-from-construct&lt;/a&gt; &lt;br&gt;
Discussion: &lt;a href="https://news-web.php.net/php.internals/130808" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/130808&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is a single primary vote to cast. Voting closes 2026-06-29 &lt;br&gt;
14:00:00 UTC.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Tim, sorry if I missed it in the discussion and RFC: is there any plan &lt;br&gt;
to allow declaring &lt;code&gt;function __construct(): void&lt;/code&gt; at the same time? &lt;br&gt;
Since:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;We are going to actively enforce that they don't return anything,&lt;/li&gt;
&lt;li&gt;and returning &lt;code&gt;void&lt;/code&gt; is the correct declaration for such functions &lt;br&gt;
(and I would argue &lt;code&gt;null&lt;/code&gt; as well but I don't care too much about &lt;br&gt;
this, I debated mentioning it at all because it's a bit off in the &lt;br&gt;
weeds),&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;doesn't it make sense to also allow declaring a void return at the same time?&lt;/p&gt;
</description><guid>CAAKU0unveLoR600SQsgjReOHR1Q5AqY=wPiQP0GbpWX4sDSdtA@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 14:56:32 +0000</pubDate></item><item><title>Request for Wiki Account - Sepehr Mahmoudi:</title><link>https://externals.io/message/131279</link><description>&lt;p&gt;Hi Sepehr,&lt;/p&gt;
&lt;p&gt;Could you explain why this functionality should be part of PHP core rather &lt;br&gt;
than a Composer package or framework-specific helper?&lt;/p&gt;
&lt;p&gt;PHP is used in many contexts outside traditional websites (CLI &lt;br&gt;
applications, daemons, APIs, desktop applications, etc.), and favicon &lt;br&gt;
discovery appears to be specific to web applications.&lt;/p&gt;
&lt;p&gt;Additionally, favicon locations are not standardized. Sites may use &lt;br&gt;
/favicon.ico, HTML link tags, SVG icons, multiple icon sizes, CDN-hosted &lt;br&gt;
assets, or framework-specific asset structures. Because of this, it is not &lt;br&gt;
obvious how PHP core could reliably determine a favicon without making &lt;br&gt;
assumptions about application structure.&lt;/p&gt;
&lt;p&gt;It would be helpful to see more details about the prototype and the &lt;br&gt;
specific problem that cannot be solved effectively in userland.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
Diogoagc&lt;/p&gt;
&lt;p&gt;سپهر محمودی &lt;a href="mailto:sepehrphpr@gmail.com"&gt;sepehrphpr@gmail.com&lt;/a&gt; escreveu em sáb., 13/06/2026 às 18:04 :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;, Hi Internals &lt;br&gt;
My name is Sepehr, and I am a web developer. I would like to request a &lt;br&gt;
Wiki account to propose a new addition to the PHP core &lt;br&gt;
Proposal: A built-in function to dynamically detect and return the &lt;br&gt;
website's favicon URL (e.g., get_favicon()). &lt;br&gt;
Motivation: &lt;br&gt;
Currently, developers have to manually handle favicon paths. I have &lt;br&gt;
developed a logic that automates this process by dynamically detecting the &lt;br&gt;
favicon file within the project structure without requiring parameters. I &lt;br&gt;
believe having a standard, built-in way to handle this would improve the &lt;br&gt;
developer experience and make PHP more web-integrated. &lt;br&gt;
Requested Username: Sepehrphp &lt;br&gt;
Email: &lt;a href="mailto:sepehrphpr@gmail.com" rel="nofollow" target="_blank"&gt;sepehrphpr@gmail.com&lt;/a&gt; &lt;br&gt;
I have a working prototype and I am ready to start the RFC process. &lt;br&gt;
Best regards, &lt;br&gt;
Sepehrphp&lt;/p&gt;
&lt;/blockquote&gt;
</description><guid>CAMGT2WqkwreVSL1Ef+kWjeKE7fbU31mt_O0qPT+GfE=1PwL5nA@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 14:22:14 +0000</pubDate></item><item><title>Request for Wiki Account - Sepehr Mahmoudi:</title><link>https://externals.io/message/131278</link><description>&lt;p&gt;Le 13/06/2026 à 19:03, سپهر محمودی a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;, Hi Internals &lt;br&gt;
My name is Sepehr, and I am a web developer. I would like to request a &lt;br&gt;
Wiki account to propose a new addition to the PHP core &lt;br&gt;
Proposal: A built-in function to dynamically detect and return the &lt;br&gt;
website's favicon URL (e.g., get_favicon()). &lt;br&gt;
Motivation: &lt;br&gt;
Currently, developers have to manually handle favicon paths. I have &lt;br&gt;
developed a logic that automates this process by dynamically detecting &lt;br&gt;
the favicon file within the project structure without requiring &lt;br&gt;
parameters. I believe having a standard, built-in way to handle this &lt;br&gt;
would improve the developer experience and make PHP more web-integrated. &lt;br&gt;
Requested Username: Sepehrphp &lt;br&gt;
Email: &lt;a href="mailto:sepehrphpr@gmail.com" rel="nofollow" target="_blank"&gt;sepehrphpr@gmail.com&lt;/a&gt; &lt;br&gt;
I have a working prototype and I am ready to start the RFC process. &lt;br&gt;
Best regards, &lt;br&gt;
Sepehrphp&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;HTML already defines a way to configure favicons using the &amp;lt;link 
rel="icon"&amp;gt; tag and its internal parameters (media, type, etc.).&lt;/p&gt;
&lt;p&gt;If no such link is defined in the HTML code, or if the page is not HTML &lt;br&gt;
(pdf, json, image, etc.), most browsers will attempt at fetching the &lt;br&gt;
&amp;quot;/favicon.ico&amp;quot; URL, which implies that it's becoming a standardized &lt;br&gt;
method to both fetch an icon from a page AND create a fallback for any &lt;br&gt;
HTTP server.&lt;/p&gt;
&lt;p&gt;Plus, I wouldn't see the actual benefits of a &amp;quot;get_favicon()&amp;quot; function &lt;br&gt;
that returns a &amp;quot;single URL&amp;quot;, considering that the &amp;lt;link rel="icon"&amp;gt; &lt;br&gt;
tag's behavior is to adapt depending on several contextual information, &lt;br&gt;
like &amp;quot;media&amp;quot; (which is basically a media-query), &amp;quot;type&amp;quot; (which is a &lt;br&gt;
mime-type, allowing compatibility with lots of different formats) and &lt;br&gt;
&amp;quot;sizes&amp;quot; which allows displaying different source media depending on the &lt;br&gt;
final displayed size: the icon in the Windows taskbar will be smaller &lt;br&gt;
than a shortcut for this website on a mobile's homepage, so the first &lt;br&gt;
one can use a lightweight &amp;quot;.ico&amp;quot; image, and the last one can use a &lt;br&gt;
scalable SVG for instance.&lt;/p&gt;
&lt;p&gt;I'm curious about what exactly your RFC would provide.&lt;/p&gt;
</description><guid>03e26c3b-2666-404e-9f78-afa37c6da1a9@gmail.com</guid><pubDate>Mon, 15 Jun 2026 14:20:38 +0000</pubDate></item><item><title>Request for Wiki Account - Sepehr Mahmoudi:</title><link>https://externals.io/message/131277</link><description>&lt;p&gt;Hi Sepehr&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;,  I would like to request a Wiki account to propose a new addition to &lt;br&gt;
the PHP core &lt;br&gt;
Proposal: A built-in function to dynamically detect and return the &lt;br&gt;
website's favicon URL (e.g., get_favicon()). &lt;br&gt;
Motivation: &lt;br&gt;
Currently, developers have to manually handle favicon paths. I have &lt;br&gt;
developed a logic that automates this process by dynamically detecting &lt;br&gt;
the favicon file within the project structure without requiring &lt;br&gt;
parameters. I believe having a standard, built-in way to handle this &lt;br&gt;
would improve the developer experience and make PHP more web-integrated.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have trouble understanding what it is this function would do exactly. &lt;br&gt;
Can you describe that in a high level?&lt;/p&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Ilija&lt;/p&gt;
</description><guid>da22368c-89b1-41ef-877a-af21d317368a@gmail.com</guid><pubDate>Mon, 15 Jun 2026 13:41:02 +0000</pubDate></item><item><title>[VOTE] Deprecate returning values from __construct() and __destruct()</title><link>https://externals.io/message/131276</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Am 2026-06-15 15:19, schrieb Kamil Tekiela:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Just to clarify: return $this-&amp;gt;privateVoidReturning(); will also &lt;br&gt;
trigger a &lt;br&gt;
deprecation?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes. This is consistent with &lt;code&gt;return some_void();&lt;/code&gt; in a function that &lt;br&gt;
has an explicit &lt;code&gt;: void&lt;/code&gt; return type:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; &amp;amp;lt;?php

 function foo(): void {
     return;
 }

 function bar(): void {
     return foo();
 }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;see: &lt;a href="https://3v4l.org/2cQYR#v" rel="nofollow" target="_blank"&gt;https://3v4l.org/2cQYR#v&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I'll make sure to add a corresponding test case to the implementation &lt;br&gt;
for completeness.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>1833c96ba3956932e297569f967a02f3@bastelstu.be</guid><pubDate>Mon, 15 Jun 2026 13:23:45 +0000</pubDate></item><item><title>[PR #22159] ext/curl: expose SOCKOPT/OPENSOCKET/CLOSESOCKET callbacks</title><link>https://externals.io/message/131275</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;PR #22159 adds three libcurl callback options to ext/curl for 8.6:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CURLOPT_SOCKOPTFUNCTION&lt;/li&gt;
&lt;li&gt;CURLOPT_OPENSOCKETFUNCTION&lt;/li&gt;
&lt;li&gt;CURLOPT_CLOSESOCKETFUNCTION&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://github.com/php/php-src/pull/22159" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22159&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Motivation: give PHP users a native way to do SSRF filtering (validate the &lt;br&gt;
resolved peer IP before connect) and low-level socket tuning &lt;br&gt;
(SO_BINDTODEVICE, SO_MARK, keepalive, TCP_NODELAY...) without dropping to &lt;br&gt;
ext/ffi.&lt;/p&gt;
&lt;p&gt;Because the C signatures use a raw curl_socket_t fd, the callbacks bridge &lt;br&gt;
to ext/sockets and exchange real Socket objects, fully usable with &lt;br&gt;
&lt;code&gt;socket_set_option()&lt;/code&gt;, &lt;code&gt;socket_close()&lt;/code&gt;, etc.&lt;/p&gt;
&lt;p&gt;Thanks to @devnexen who helped me to improve the dependencies management &lt;br&gt;
and the low level integration. &lt;br&gt;
CI is fully green (Linux, macOS, FreeBSD, Windows, ASAN).&lt;/p&gt;
&lt;p&gt;Feedback welcome on any matter.&lt;/p&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Xavier Leune&lt;/p&gt;
</description><guid>CAKNL=FfwdeJy4CvX9ONndfzHtafMniiSkV_GdnWzCjRLuOTZsw@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 13:20:56 +0000</pubDate></item><item><title>[VOTE] Deprecate returning values from __construct() and __destruct()</title><link>https://externals.io/message/131274</link><description>&lt;blockquote&gt;
&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I just opened the vote on “Deprecate returning values from __construct() &lt;br&gt;
and __destruct()”.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/deprecate-return-value-from-construct" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/deprecate-return-value-from-construct&lt;/a&gt; &lt;br&gt;
Discussion: &lt;a href="https://news-web.php.net/php.internals/130808" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/130808&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is a single primary vote to cast. Voting closes 2026-06-29 &lt;br&gt;
14:00:00 UTC.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Just to clarify: return $this-&amp;gt;privateVoidReturning(); will also trigger a &lt;br&gt;
deprecation?&lt;/p&gt;
</description><guid>CAGBsUrfr0MDDW0hNcZAo2o+KV=toE1DzihY12=EwYmT85ubomw@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 13:19:49 +0000</pubDate></item><item><title>[VOTE] [RFC] Bound-Erased Generic Types</title><link>https://externals.io/message/131273</link><description>&lt;blockquote&gt;
&lt;p&gt;And to what I've read on the thread, the decision were made on &lt;em&gt;this RFC&lt;/em&gt;, not on the concept of Generics itself.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I was responding directly to Daniil's comment starting &amp;quot;if this RFC is rejected...&amp;quot;, not commenting on how anyone has voted.&lt;/p&gt;
&lt;p&gt;If this RFC is rejected, it means &lt;em&gt;only&lt;/em&gt; that this specific proposal is rejected, and there are plenty of options being discussed for alternatives.&lt;/p&gt;
&lt;p&gt;I did not want a statement implying differently to stand unchallenged.&lt;/p&gt;
&lt;p&gt;Rowan Tommins &lt;br&gt;
[IMSoP]&lt;/p&gt;
</description><guid>35656758-2F80-4C73-8938-2DD0D658768D@rwec.co.uk</guid><pubDate>Mon, 15 Jun 2026 13:11:56 +0000</pubDate></item><item><title>[VOTE] Deprecate returning values from __construct() and __destruct()</title><link>https://externals.io/message/131272</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I just opened the vote on “Deprecate returning values from __construct() &lt;br&gt;
and __destruct()”.&lt;/p&gt;
&lt;p&gt;RFC: &lt;a href="https://wiki.php.net/rfc/deprecate-return-value-from-construct" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/deprecate-return-value-from-construct&lt;/a&gt; &lt;br&gt;
Discussion: &lt;a href="https://news-web.php.net/php.internals/130808" rel="nofollow" target="_blank"&gt;https://news-web.php.net/php.internals/130808&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is a single primary vote to cast. Voting closes 2026-06-29 &lt;br&gt;
14:00:00 UTC.&lt;/p&gt;
&lt;p&gt;Best regards &lt;br&gt;
Tim Düsterhus&lt;/p&gt;
</description><guid>14acdc79fc2424184c64bfc3c0972d87@bastelstu.be</guid><pubDate>Mon, 15 Jun 2026 13:09:08 +0000</pubDate></item><item><title>[RFC] Working Groups</title><link>https://externals.io/message/131271</link><description>&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Anything that doesn't need special powers can more efficiently be &lt;br&gt;
organized without the overhead of the initial RFC, as can also be &lt;br&gt;
seen by The PHP Foundation planning to launch 6 “special interest &lt;br&gt;
groups” in the remainder of 2026 without needing to involve the PHP &lt;br&gt;
project:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://thephp.foundation/blog/2026/06/11/integrating-community-" rel="nofollow" target="_blank"&gt;https://thephp.foundation/blog/2026/06/11/integrating-community-&lt;/a&gt; &lt;br&gt;
feedback-into-foundation-strategy-part2/#community-special-interest-groups&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'm aware of the PHP Foundation special interest groups, and Elizabeth &lt;br&gt;
and I discussed them before I opened the Working Groups RFC for &lt;br&gt;
discussion. We agreed they do not cover the same ground as the Working &lt;br&gt;
Groups RFC. By design, the PHP Foundation SIGs have no operational or &lt;br&gt;
governance authority over the PHP Project. There can be &lt;br&gt;
cross-pollination and collaboration between the initiatives, but the &lt;br&gt;
SIGs are external, community-focused, interest groups, while PHP WGs &lt;br&gt;
are internal, PHP Project-focused, operational groups.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;My 2cents in the form of questions (because I might have missed something):&lt;/p&gt;
&lt;p&gt;Since the PHPF's role is to support, help and discuss, then shouldn't &lt;br&gt;
PHPF operatives be excluded from voting on RFCs, whatever the involved &lt;br&gt;
WG? It would ensure that the PHP voters (aka &amp;quot;/The community that &lt;br&gt;
includes contributors and core team members/&amp;quot;) can take decisions &lt;br&gt;
without the PHPF being able to intervene if there's a disagreement &lt;br&gt;
between the two groups, I guess...?&lt;/p&gt;
&lt;p&gt;And similarly, shouldn't there be a mandatory consultation from the PHP &lt;br&gt;
community when the PHPF actually operates on something that impacts the &lt;br&gt;
community on non-RFC-mandatory-operations, like marketing, &lt;br&gt;
communication, etc.? I mean, if at some point the PHPF communicates on &lt;br&gt;
the web on something the PHP community would disagree with (concluded &lt;br&gt;
via a vote of whatever sort), shouldn't the PHPF, as a &amp;quot;consultative &lt;br&gt;
agency&amp;quot;, have to update their acts and productions to fit to the &lt;br&gt;
community's views? (that would solve parts of the issues with the recent &lt;br&gt;
hot discussions on a certain link to a certain platform on PHP's &lt;br&gt;
website, for example).&lt;/p&gt;
&lt;p&gt;All these questions are here because PHP has no official governance &lt;br&gt;
other than the (sometimes vaguely) designated &amp;quot;PHP Community&amp;quot;, and the &lt;br&gt;
PHPF's role, from what I understand, is mostly to &lt;em&gt;help the community to &lt;br&gt;
decide and act&lt;/em&gt; on PHP-related tasks, but &lt;em&gt;not directly decide nor act&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I might be off of some details, so feel free to correct me if I miss &lt;br&gt;
something, if I'm mistaking, or if I misunderstand certain roles or notions.&lt;/p&gt;
</description><guid>043a2bb9-4a0d-4c0d-abb2-8dfc38790b30@gmail.com</guid><pubDate>Mon, 15 Jun 2026 12:39:42 +0000</pubDate></item><item><title>[RFC] [Discussion] Literal Scalar Types</title><link>https://externals.io/message/131270</link><description>&lt;blockquote&gt;
&lt;p&gt;Hello Internals,&lt;/p&gt;
&lt;p&gt;I'd like to start the discussion on a new RFC adding literal scalar &lt;br&gt;
types to PHP.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RFC: &lt;a href="https://wiki.php.net/rfc/literal_scalar_types" rel="nofollow" target="_blank"&gt;https://wiki.php.net/rfc/literal_scalar_types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Implementation: &lt;a href="https://github.com/php/php-src/pull/22314" rel="nofollow" target="_blank"&gt;https://github.com/php/php-src/pull/22314&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks, &lt;br&gt;
Seifeddine.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I mainly see the benefit here as being able to be more strict about what &lt;br&gt;
a function actually accepts and returns, in cases where a dedicated enum &lt;br&gt;
would be overkill.&lt;/p&gt;
&lt;p&gt;Two things I'd like to understand better:&lt;/p&gt;
&lt;p&gt;Does the RFC allow referencing constants in type positions, or only raw &lt;br&gt;
literal values?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function foo(STATUS_ACTIVE|STATUS_INACTIVE $sort): void {}
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;What about enum values? For example:

function bar(Status::Active-&amp;gt;value $status): void {}
// or simply as
function bar(Status::Active $status): void {}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Also, I'm not really a fan of mixing literal types with unions.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function foo(int|'bar' $param): void {}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To me, mixing these makes it harder to reason about what a function &lt;br&gt;
actually accepts. The whole point of literal types is to be (more) &lt;br&gt;
precise but the moment you throw a wide type like int into the union, &lt;br&gt;
that precision goes out the window. If a function takes int|'bar', what &lt;br&gt;
does that really tell me? It feels like it defeats the purpose.&lt;/p&gt;
&lt;p&gt;-- &lt;br&gt;
Regards,&lt;/p&gt;
&lt;p&gt;Jordi Kroon&lt;/p&gt;
</description><guid>20260615120905.7F3AD1A00BD@lists.php.net</guid><pubDate>Mon, 15 Jun 2026 12:09:05 +0000</pubDate></item><item><title>[VOTE] [RFC] Bound-Erased Generic Types</title><link>https://externals.io/message/131269</link><description>&lt;p&gt;Le 15/06/2026 à 10:51, Rowan Tommins [IMSoP] a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;I agree 100%, voters should take responsibility for their own actions, instead of asking to hold off the vote indefinitely, constantly requesting changes. &lt;br&gt;
I think it's generally preferable for the main aim to be reaching consensus, and a vote confirming that consensus, rather than treating votes as something to be &amp;quot;won&amp;quot; and &amp;quot;lost&amp;quot;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;However, if there's genuine deadlock in a discussion, I guess bringing to a vote is a way to get a decision made.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The discussion thread on the internals list is already huge, so I guess &lt;br&gt;
at least a substantial proportion of the people who voted have already &lt;br&gt;
expressed themselves.&lt;/p&gt;
&lt;p&gt;And to what I've read on the thread, the decision were made on &lt;em&gt;this &lt;br&gt;
RFC&lt;/em&gt;, not on the concept of Generics itself.&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;If this RFC is rejected, PHP won’t have generics (at least not in 2026/the first half of 2027 due to the cooling off period of RFCs of the same type).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That is, luckily, not what the policy says; it says &amp;quot;it will not be allowed to bring up a rejected proposal for another vote, unless ... the authors make substantial changes to the proposal&amp;quot;. So an RFC building on Seifeddine's work but taking a different approach to enforcement could be brought forward at any time.&lt;/p&gt;
&lt;p&gt;Holding a vote is not, and should not be, a way to block alternatives or counter-proposals.&lt;/p&gt;
&lt;p&gt;Let's not get into the rhetoric of &amp;quot;this is your only chance for generics&amp;quot;. If the vote is going ahead, people should vote on &lt;em&gt;this specific proposal&lt;/em&gt;, with the specific tradeoffs it includes.&lt;/p&gt;
&lt;p&gt;It's great that we're making progress towards generics; now let's work together to get the best version of them we can.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;One of my interpretations is that &amp;quot;complete generics&amp;quot; isn't possible &lt;br&gt;
per-se considering the current way the compiler and engine work.&lt;/p&gt;
&lt;p&gt;However, it's not impossible to implement &amp;quot;generic-like systems&amp;quot;, and &lt;br&gt;
maybe a smaller RFC, for example about typed &lt;br&gt;
arrays/ArrayObject/Iterator, could already bring a lot of value, without &lt;br&gt;
having full generics yet.&lt;/p&gt;
</description><guid>9c7f8ba0-a0c7-42d3-95a5-d77204d65a3e@gmail.com</guid><pubDate>Mon, 15 Jun 2026 11:36:40 +0000</pubDate></item><item><title>[RFC] [Discussion] Bound-Erased Generic Types - non-voter feedback on the path forward</title><link>https://externals.io/message/131268</link><description>&lt;p&gt;Hi internals,&lt;/p&gt;
&lt;p&gt;I am not a voter, so please treat this only as feedback from a long-time &lt;br&gt;
PHP user and backend/application architect.&lt;/p&gt;
&lt;p&gt;I am aware that voting is already open for the Bound-Erased Generic Types &lt;br&gt;
RFC. I am not writing to ask anyone to vote yes or no on the current RFC. &lt;br&gt;
Rather, I would like to ask that PHP keeps a clear and credible path &lt;br&gt;
toward generics after this vote, regardless of the outcome.&lt;/p&gt;
&lt;p&gt;From a userland perspective, the need for generics is real. In large PHP &lt;br&gt;
codebases, generic-like contracts already exist everywhere: repositories, &lt;br&gt;
collections, serializers, DTO mappers, dependency injection containers, &lt;br&gt;
event buses, pipelines, result/either types, iterators, hydrators, and &lt;br&gt;
framework extension points.&lt;/p&gt;
&lt;p&gt;Today, most of these contracts are expressed through PHPDoc and interpreted &lt;br&gt;
by static analyzers, IDEs, and framework-specific tooling. That has allowed &lt;br&gt;
the ecosystem to move forward, but it also means that one of the most &lt;br&gt;
important parts of the program's type model is outside the language itself.&lt;/p&gt;
&lt;p&gt;At the same time, I think the concerns about trust are valid. Native PHP &lt;br&gt;
type declarations currently have a strong expectation attached to them: &lt;br&gt;
when a developer sees a parameter type, return type, or property type in &lt;br&gt;
PHP syntax, they can assume PHP itself enforces it.&lt;/p&gt;
&lt;p&gt;If generic syntax weakens that mental model, PHP may gain nicer syntax but &lt;br&gt;
lose some clarity in its type system. I do not think that would be a good &lt;br&gt;
trade-off.&lt;/p&gt;
&lt;p&gt;That suggests to me that the most important question is not only &amp;quot;erased &lt;br&gt;
vs reified&amp;quot;, but rather:&lt;/p&gt;
&lt;p&gt;What kind of type information is this, and who is responsible for enforcing &lt;br&gt;
it?&lt;/p&gt;
&lt;p&gt;I would like PHP to have an explicit long-term type model with at least &lt;br&gt;
these categories:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Runtime-enforced types, as PHP has today.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Compile-time or class-loading-time parametric constraints, especially &lt;br&gt;
for inheritance, interfaces, abstract classes, method signatures, and &lt;br&gt;
property types where this is possible.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Tooling metadata, useful for static analyzers, IDEs, Reflection-based &lt;br&gt;
frameworks, and code generation, but explicitly not guaranteed by the &lt;br&gt;
runtime.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If PHP adopts erased or partially-erased generics, I think the language &lt;br&gt;
should make this distinction very explicit in documentation, Reflection, &lt;br&gt;
and diagnostics. A developer should be able to tell whether a generic type &lt;br&gt;
is enforced by PHP itself, validated during class loading or inheritance &lt;br&gt;
checks, or merely preserved as structured metadata for tools.&lt;/p&gt;
&lt;p&gt;As a possible path forward, I would personally prefer a smaller enforceable &lt;br&gt;
subset first, even if it does not cover every use case that userland wants.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Generic interfaces first.&lt;/li&gt;
&lt;li&gt;Generic abstract classes next.&lt;/li&gt;
&lt;li&gt;Concrete classes implementing or extending them should bind type &lt;br&gt;
parameters, unless PHP explicitly supports keeping those declarations &lt;br&gt;
generic.&lt;/li&gt;
&lt;li&gt;Substituted method signatures, return types, parameter types, and &lt;br&gt;
property types should be checked by PHP where possible.&lt;/li&gt;
&lt;li&gt;Reflection should expose structured generic metadata in a stable way.&lt;/li&gt;
&lt;li&gt;Generic &amp;quot;new&amp;quot;, generic functions, complex inference, generic compound &lt;br&gt;
types, and runtime reification can remain future work.&lt;/li&gt;
&lt;li&gt;Object-based collections can be built on top of that model before trying &lt;br&gt;
to solve typed arrays.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This would not give PHP full generics immediately, but it would give the &lt;br&gt;
ecosystem a trustworthy foundation. It would also let frameworks and &lt;br&gt;
libraries start replacing PHPDoc templates with native declarations in the &lt;br&gt;
places where there is an actual PHP-level contract behind them.&lt;/p&gt;
&lt;p&gt;I believe this is important for more than syntax. A native and trustworthy &lt;br&gt;
generic model would help static analysis, IDEs, framework design, &lt;br&gt;
Reflection-based tooling, code generation, and potentially future optimizer &lt;br&gt;
or compilation work. Without such a model, PHP can still continue to &lt;br&gt;
improve, but a large part of its type information will remain fragmented &lt;br&gt;
across PHPDoc conventions and external tools.&lt;/p&gt;
&lt;p&gt;If the current RFC fails, I hope it is not interpreted as &amp;quot;PHP does not &lt;br&gt;
want generics.&amp;quot; I think a more useful interpretation would be that PHP &lt;br&gt;
needs a generics roadmap with a clearer trust and enforcement model.&lt;/p&gt;
&lt;p&gt;If the current RFC passes, I hope the same concern is still addressed: &lt;br&gt;
the language should document very clearly which parts are enforced by PHP, &lt;br&gt;
which parts are checked only by static analyzers, and which future steps &lt;br&gt;
are expected to close the remaining gaps.&lt;/p&gt;
&lt;p&gt;My main request is therefore:&lt;/p&gt;
&lt;p&gt;Please do not let the generics discussion remain a binary choice between &lt;br&gt;
&amp;quot;full reified generics now&amp;quot; and &amp;quot;PHPDoc forever.&amp;quot;&lt;/p&gt;
&lt;p&gt;A smaller, enforceable, explicitly staged model would already be a major &lt;br&gt;
improvement for large PHP systems, and it would preserve trust in PHP's &lt;br&gt;
native type syntax.&lt;/p&gt;
&lt;p&gt;Thank you for all the work that has gone into this RFC and the discussion.&lt;/p&gt;
&lt;p&gt;Regards, &lt;br&gt;
&amp;lt;wheakerd&lt;/p&gt;
</description><guid>CAFJdCSuO298GauF5+bnOLuQ2vrvvwkwGvf61Vdak3wwuibS8Xg@mail.gmail.com</guid><pubDate>Mon, 15 Jun 2026 10:54:50 +0000</pubDate></item><item><title>Containers. (was Re:  Two-step creation for PHP modules)</title><link>https://externals.io/message/131267</link><description>&lt;p&gt;Le 13/06/2026 à 19:14, Rowan Tommins [IMSoP] a écrit :&lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Namespaces in PHP are a bit of a hack - they prepend the stated namespace &lt;br&gt;
to all labels declared in the file, and the use statement allows the fully &lt;br&gt;
qualified name of a class, function or constant to be stated only once, &lt;br&gt;
usually at the head of the file. It also allows aliasing, say if you have a &lt;br&gt;
&amp;quot;Parser&amp;quot; class out of two different packages - you can alias them as &lt;br&gt;
&amp;quot;FooParser&amp;quot; and &amp;quot;BarParser&amp;quot;. It looks like Java or JavaScript importing, &lt;br&gt;
but it isn't. &lt;br&gt;
A small correction: this is exactly the same way that namespaces work in Java, with exactly the same implication: the fully qualified class name has to be globally unique. Java's solution to isolating an entire set of names is apparently to define an &amp;quot;Isolated ClassLoader&amp;quot;: &lt;a href="https://www.javathinking.com/blog/what-is-an-isolated-classloader-in-java/" rel="nofollow" target="_blank"&gt;https://www.javathinking.com/blog/what-is-an-isolated-classloader-in-java/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;C# also has this model of namespaces, but allows you to isolate a set of names from a particular &amp;quot;assembly&amp;quot; using an &amp;quot;extern alias&amp;quot; statement: &lt;a href="https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/extern-alias" rel="nofollow" target="_blank"&gt;https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/extern-alias&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I suspect both mechanisms rely on details of their respective runtimes that wouldn't translate to PHP, but in principle what we're looking for is something similar.&lt;/p&gt;
&lt;p&gt;Rowan Tommins &lt;br&gt;
[IMSoP]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Namespaces being just a globally accessible and define-able symbols &lt;br&gt;
system is exactly why, so far, a PHP package cannot define &amp;quot;private &lt;br&gt;
internal&amp;quot; code. The way the language works already allows &lt;br&gt;
autoload-hijacking in order to override code from external libs, or even &lt;br&gt;
hack the visibility (like removing &amp;quot;final&amp;quot; or &amp;quot;private&amp;quot; keywords before &lt;br&gt;
autoloading the file...). &lt;br&gt;
After 18 years of PHP coding, including 15 years as a professional, I've &lt;br&gt;
seen a huge lot of legacy PHP projects that benefit the language's &lt;br&gt;
flexibility. Sure thing many of businesses could succeed thanks to being &lt;br&gt;
able to override almost everything (contrary to stricter languages), but &lt;br&gt;
maintaining these codebases with up-to-date versions of PHP, or &lt;br&gt;
3rd-party libs, is so much of a hassle that, at some point, lots of &lt;br&gt;
maintainers are going more and more into adding new things into PHP that &lt;br&gt;
enforce a bit more strictness, opt-in of course. Some other libs (I'm &lt;br&gt;
thinking about EasyAdmin, in the Symfony ecosystem, for example) have &lt;br&gt;
even made the choice to close pretty much everything and provide &lt;br&gt;
&amp;quot;maintainable&amp;quot; public entrypoints, enforcing the Open/Close principle &lt;br&gt;
with a strict approach (immutable final classes, stricter options and &lt;br&gt;
arguments, etc.). It has its pros and cons, and can be frustrating for &lt;br&gt;
some devs, but the main goal was to make maintenance a bit easier for &lt;br&gt;
the core devs so that they are not forced to maintain BC on too many layers.&lt;/p&gt;
&lt;p&gt;Introducing Modules, whether they are based on namespaces or not, would &lt;br&gt;
help maintainers, I think, and could reinvent how we think of PHP &lt;br&gt;
packages, while still keeping PHP what it has always been because it &lt;br&gt;
would be opt-in for maintainers.&lt;/p&gt;
&lt;p&gt;On my side, I don't care if modules are tightly coupled to namespaces or &lt;br&gt;
not, and if more, that's even why my first idea was to bind a module to &lt;br&gt;
a single-file at first, and making all modules imported from such file &lt;br&gt;
being non-importable-again, thus creating a single module tree that can &lt;br&gt;
be stored at compile-time, have no side-effect at load-time (which is a &lt;br&gt;
big safeguard to avoid other issues), and allowing multiple modules of &lt;br&gt;
seemingly same name to be loaded in the memory at the same time, &lt;br&gt;
similarly to how Node.js allows having different versions of the same &lt;br&gt;
packages to be installed, while also allowing to have one version used &lt;br&gt;
by many modules too.&lt;/p&gt;
&lt;p&gt;The only drawback of having modules like that would be that final &lt;br&gt;
dependency trees in Composer would be non-flat, but again, I think this &lt;br&gt;
non-flat system should be opt-in. Similarly to how flat systems are &lt;br&gt;
opt-in in the Node.js ecosystem (and trust me, I've tried to enforce &lt;br&gt;
&amp;quot;flat&amp;quot; dependencies resolutions in certain Node projects, and it's a &lt;br&gt;
huge hassle). Luckily, the PHP ecosystem is quite fine so far, compared &lt;br&gt;
to Node, and I would definitely keep the &amp;quot;flat&amp;quot; system in Composer for &lt;br&gt;
as long as possible, and make non-flat resolutions only case-specific &lt;br&gt;
(which is rare, and usually framework-dependent, like with Wordpress &lt;br&gt;
plugins for instance).&lt;/p&gt;
&lt;p&gt;I still hope we could have a grouped discussion on this.&lt;/p&gt;
&lt;p&gt;Larry's Modules proposal (here: &lt;br&gt;
&lt;a href="https://github.com/Crell/php-rfcs/blob/master/modules/spec-brainstorm.md" rel="nofollow" target="_blank"&gt;https://github.com/Crell/php-rfcs/blob/master/modules/spec-brainstorm.md&lt;/a&gt; ) &lt;br&gt;
is IMO a very good starting point, and it only lacks the &amp;quot;multiple &lt;br&gt;
modules with different versions&amp;quot;. And module definition with an INI file &lt;br&gt;
looks interesting.&lt;/p&gt;
&lt;p&gt;Adding a &amp;quot;container&amp;quot; system when importing a module can maybe allow &lt;br&gt;
this, I don't know...?&lt;/p&gt;
&lt;p&gt;@Michael: do you think you could start a new thread for PHP containers? &lt;br&gt;
Do you already have some research that you could bring for a pre-RFC &lt;br&gt;
discussion?&lt;/p&gt;
</description><guid>58ac44ac-1928-4fed-abef-f41ef1b62c68@gmail.com</guid><pubDate>Mon, 15 Jun 2026 09:45:18 +0000</pubDate></item><item><title>[VOTE] [RFC] Bound-Erased Generic Types</title><link>https://externals.io/message/131266</link><description>&lt;blockquote&gt;
&lt;p&gt;I agree 100%, voters should take responsibility for their own actions, instead of asking to hold off the vote indefinitely, constantly requesting changes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I think it's generally preferable for the main aim to be reaching consensus, and a vote confirming that consensus, rather than treating votes as something to be &amp;quot;won&amp;quot; and &amp;quot;lost&amp;quot;.&lt;/p&gt;
&lt;p&gt;However, if there's genuine deadlock in a discussion, I guess bringing to a vote is a way to get a decision made.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If this RFC is rejected, PHP won’t have generics (at least not in 2026/the first half of 2027 due to the cooling off period of RFCs of the same type).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That is, luckily, not what the policy says; it says &amp;quot;it will not be allowed to bring up a rejected proposal for another vote, unless ... the authors make substantial changes to the proposal&amp;quot;. So an RFC building on Seifeddine's work but taking a different approach to enforcement could be brought forward at any time.&lt;/p&gt;
&lt;p&gt;Holding a vote is not, and should not be, a way to block alternatives or counter-proposals.&lt;/p&gt;
&lt;p&gt;Let's not get into the rhetoric of &amp;quot;this is your only chance for generics&amp;quot;. If the vote is going ahead, people should vote on &lt;em&gt;this specific proposal&lt;/em&gt;, with the specific tradeoffs it includes.&lt;/p&gt;
&lt;p&gt;It's great that we're making progress towards generics; now let's work together to get the best version of them we can.&lt;/p&gt;
&lt;p&gt;Rowan Tommins &lt;br&gt;
[IMSoP]&lt;/p&gt;
</description><guid>02B13F7E-082D-4E84-B4F0-4428EA6059D8@rwec.co.uk</guid><pubDate>Mon, 15 Jun 2026 08:51:19 +0000</pubDate></item></channel></rss>
