I read through the related questions and didn't find my answer. This isn't about require
/require_once
or the use of the __autoload
function or even the name of the files.
My company builds large sites and as we've grown, the practice we've grown into is splitting up functions by their relation such as:
inc.functions-user.php inc.functions-media.php inc.functions-calendar.php
Each these files tends to be 1000 to 3000 lines of code. Combining would make them a monster to maintain and more difficult for more developers.
However, in some of our larger sites, we end of with somewhere between 8 and 15 of these individual functions files.
Is including the 15 functions files in the header the best way or should we find a way to combine them? Are 12 includes vs. 5 includes significantly detrimental to the running of our site?