# [RFC] [VOTE] Function Autoloading (mark 5)

- Thread: https://externals.io/message/132134
- Original archive: https://news-web.php.net/php.internals/132134
- Started by Paul M. Jones on 2026-07-30T14:46:21+00:00
- Messages: 8
- RFC: Function Autoloading (mark 5) (Declined) — https://externals.io/rfc/function-autoloading-five-oh.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #132134 — Paul M. Jones — 2026-07-30T14:46:21+00:00

URL: https://externals.io/message/132134#132134

Hi all,

Per my message from a couple of weeks ago <https://externals.io/message/131332#131945> I have opened the vote for Function Autoloading (mark 5):

- <https://wiki.php.net/rfc/function-autoloading-five-oh>

The vote runs for two weeks and will close automatically at 14:45 UTC on Thu 13 Aug 2026.

N.b.: Voters concerned about shadowed global functions should note that such cases, while real in principle, are extremely rare in practice; those very few cases can be mitigated easily. Cf. <https://wiki.php.net/rfc/function-autoloading-five-oh#how_common_is_the_shadow-global_case>.

Thanks!


-- pmj

---

## #132145 — Matteo Beccati — 2026-07-31T07:57:35+00:00

URL: https://externals.io/message/132134#132145 · In reply to: #132134

Hi Paul,

Il 30/07/2026 16:46, Paul M. Jones ha scritto:
> Hi all,
> 
> Per my message from a couple of weeks ago <https://externals.io/message/131332#131945> I have opened the vote for Function Autoloading (mark 5):
> 
> - <https://wiki.php.net/rfc/function-autoloading-five-oh>
> 
> The vote runs for two weeks and will close automatically at 14:45 UTC on Thu 13 Aug 2026.
> 
> N.b.: Voters concerned about shadowed global functions should note that such cases, while real in principle, are extremely rare in practice; those very few cases can be mitigated easily. Cf. <https://wiki.php.net/rfc/function-autoloading-five-oh#how_common_is_the_shadow-global_case>.
I think this is the best autoloading proposal up to date.

Most likely I would have voted yes if the target was 8.7, leaving us 
plenty of time to intervene in case of issues.

Perhaps I'm biased as RM, but last minute RFCs are making me nervous, I 
hope you understand.


Cheers
-- 
Matteo

---

## #132146 — tim@bastelstu.be — 2026-07-31T08:10:29+00:00

URL: https://externals.io/message/132134#132146 · In reply to: #132145

Hi


> > […]
> I think this is the best autoloading proposal up to date.
> 
> Most likely I would have voted yes if the target was 8.7, leaving us 
> plenty of time to intervene in case of issues.
> 
> Perhaps I'm biased as RM, but last minute RFCs are making me nervous, I 
> hope you understand.

In fact the start of the vote is in violation of our policy, since there 
was no “intent to vote” message in the last 7 days.

I regretfully missed the email #131945 from two weeks ago, but also 
didn't expect this RFC to go to vote, since:

1. The namespace-resolution-declare was just split out of it and in my 
opinion having a decision on that first would be helpful to make an 
educated decision on this one.
2. With the major change on the Wednesday, July 15th it was not able to 
meet the soft freeze deadline that I calculated with (which should've 
been Tuesday, August 11 according to policy).

As indicated during the discussion, I consider it unacceptable for the 
autoloading to fail when a global function with the same unqualified 
name exists. This adds further inconsistency to the language and I 
expect the proposed behavior to be a source of bug reports from users 
wondering why the autoloading doesn't work as expected.

Best regards
Tim Düsterhus

---

## #132148 — Paul M. Jones — 2026-07-31T13:09:15+00:00

URL: https://externals.io/message/132134#132148 · In reply to: #132146

> 
> 
> Hi
> 
> 
> > […]
> 
> In fact the start of the vote is in violation of our policy, since there was no “intent to vote” message in the last 7 days.

Ah so -- my apologies. I'll pull the vote and wait for ... looks like ~6 weeks?

Again, sorry for the hassle.


-- pmj

---

## #132151 — tim@bastelstu.be — 2026-07-31T15:52:21+00:00

URL: https://externals.io/message/132134#132151 · In reply to: #132148

Hi


> > […]
> 
> Ah so -- my apologies. I'll pull the vote and wait for ... looks like 
> ~6 weeks?

According to policy you could cancel the vote now, which results in a 
2-week cooldown, which means you could theoretically re-open in the 
middle of August (after another “Intent to Vote”).

However given the preliminary voting results and under the assumption 
that folks didn't just vote against due to the policy violation, it is 
likely not useful to reopen the vote without making further changes - or 
without the circumstances changing (specifically your “Strict Namespace 
Resolution” RFC getting a decision). In any case, there will be plenty 
of time until PHP 8.7.

Without giving it detailed thought, I believe “Namespaced function, 
Autoload namespaced function, Global fallback” (i.e. swap steps 2 and 3) 
would result in much more predictable semantics already - the global 
fallback would work just as before, it just wouldn't have autoloading 
support. It's quite possible I'm changing my mind on that as well when I 
think more about it, but I wanted to provide some food for thought as to 
how the RFC could possibly be adjusted to make it better.

Best regards
Tim Düsterhus

---

## #132152 — Paul M. Jones — 2026-07-31T16:03:37+00:00

URL: https://externals.io/message/132134#132152 · In reply to: #132151

Hi,

> 
> 
> Hi
> 
> 
> > […]
> 
> According to policy you could cancel the vote now, which results in a 2-week cooldown, which means you could theoretically re-open in the middle of August (after another “Intent to Vote”).
> 
> However given the preliminary voting results and under the assumption that folks didn't just vote against due to the policy violation, it is likely not useful to reopen the vote without making further changes - or without the circumstances changing (specifically your “Strict Namespace Resolution” RFC getting a decision). In any case, there will be plenty of time until PHP 8.7.
> 
> Without giving it detailed thought, I believe “Namespaced function, Autoload namespaced function, Global fallback” (i.e. swap steps 2 and 3) would result in much more predictable semantics already - the global fallback would work just as before, it just wouldn't have autoloading support. It's quite possible I'm changing my mind on that as well when I think more about it, but I wanted to provide some food for thought as to how the RFC could possibly be adjusted to make it better.

Sure, no hurry on my part. Can come back to it after 8.6 is fully out the door.

I have edited the RFC to set the vote to "closed" -- let me know if some other approach is preferred.

Thanks!


-- pmj

---

## #132157 — Rowan Tommins [IMSoP] — 2026-07-31T16:07:44+00:00

URL: https://externals.io/message/132134#132157 · In reply to: #132151

Hi Tim,


>Without giving it detailed thought, I believe “Namespaced function, Autoload namespaced function, Global fallback” (i.e. swap steps 2 and 3) would result in much more predictable semantics already - the global fallback would work just as before, it just wouldn't have autoloading support.

Semantically, that makes most sense, but it leads to terrible performance for the global fallback case, unless there's some way to avoid multiple checks for the same namespaced function. That's why we keep going round in circles on the whole issue. 

I think Michael's "namespace autoloader" idea is a much cleaner way forward - it avoids the fallback issue without creating lots of extra special cases, and in reality "load a file with all functions for namespace Foo\Bar" is likely to be more common than "load a file which specifically defines function Foo\Bar\baz()".

Regards,

Rowan Tommins
[IMSoP]

---

## #132154 — tim@bastelstu.be — 2026-07-31T17:10:21+00:00

URL: https://externals.io/message/132134#132154 · In reply to: #132152

Hi


> I have edited the RFC to set the vote to "closed" -- let me know if 
> some other approach is preferred.

Thanks. You should also adjust the title of the voting widget to clear 
out any votes and move the RFC in the overview back to “Under 
Discussion”. Actual discussion of the RFC should then continue in the 
discussion thread, I'll repeat my suggestion from my previous email 
there to have a discussion starter and to bump the thread.

Best regards
Tim Düsterhus
