Thread:Project:Support desk/question about php code/reply (5)

Aside from the  potentially being used somewhere else (and it becoming a global variable...), it also makes it harder to add an extension in an automated way.

Adding  is easy from a automated point of view. Whereas looking for this array and adding something to it is harder.

And there is the argument of some extensions (either older ones or ones not in Wikimedia SVN) not following this convention (either they don't have a directory or the file might be named differently than the directory etc.).

There's also readability to some degree (the long array is less readable, although one could add a line break after each array item).