There is no performance improvement that really makes a difference. If measuring is likely, but it is not certain, it has some advantage to one side or the other. If you really want to know, take a benchmark test. I will not do it because it is not worth even being simple to do. It does not matter, it does not change anything in any program.
Note that the way the file is organized, both in one form and the other, and the way it will recover this data can make more difference. A comparison to understand: What is faster, access the disk or access memory? It depends on how each access is made. It is possible to make such a poor memory algorithm that it is slower than accessing the same data on disk. It is an extreme example but it is possible. The moral of the story is that algorithms are more important.
In general in other languages I would say that setting up a data structure in the code itself might be better because it does not depend on an external file that can be modified by someone, even disappear. And it would have the advantage of allowing someone to change the settings through the external file. But in PHP the settings are already in an external file that can be modified.
What I can see differently and this is important is that if you just return a setting and have all of them in a central file (no matter what format and how it is loaded) it changes the organization.
In general I would have a central file but it depends on the case. Having a loaded central file may be slightly slower because it will load settings that it does not need at that time. But this is minimal and will not make any difference. It's purely for organizational reasons. Imagine having to search for settings throughout the application. But I do not say that there can be no cases that decentralize is positive, I just can not see one easily.
Other than that, unless I see an explicit justification, I would say it's a matter of style.
But note that the first case may not be considered exactly configuration. I have not seen a concrete case but it may just be a necessary information for something punctual. Although the property calls
config does not mean that it is actually a setting like other existing ones. There may be a semantic motif to do differently. There may be a need, in this case, to make it clear that there needs to be done in isolation from other settings.