go to bug id or search bugs for
I know there are plenty of bug reports about this, but I want to be sure this gets the renewed attention it deserves.
I've read some very stupid arguments against function autoloading, namely "just use OOP" "just use static methods" which are actual solutions, but hacks compared to what functional programming should look like. Or worse "you usually have one class per file, nobody wants one function per file" which is also stupid since one could do:
$pos = strrpos($namespacedFunctionName, '\\');
$nsName = substr($namespacedFunctionName, 0, $pos); // strips the function name
$file = $nsName . DIRECTORY_SEPARATOR . 'functions.php'; // contains all the functions in the NS
... and would work perfectly fine. Not to mention that with opcache nobody worries of loading files performance as they are cached.
Can we have this, please? I was expecting this to be possible in 7.0 but apparently it's not going to happen even in 7.1: why?
Add a Patch
Add a Pull Request
> I know there are plenty of bug reports about this, […]
I quick search didn't show up any related tickets. Please point
out the other reports, so all but one can be marked as duplicates.
> Can we have this, please? I was expecting this to be possible in
> 7.0 but apparently it's not going to happen even in 7.1: why?
There has been a respective RFC around for quite a while, but
it hasn't been pursued. I'm not sure why. Maybe you'll grab that
up? In that case you should contact Anthony (the author) first,
whether he's fine with it.
There is already an RFC for this feature.
An RFC is the proper way to push such a feature through.