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):
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
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):
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
Hi
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):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.
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:
- 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. - 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
Hi
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.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
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?
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
Hi,
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?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
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
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]