Continuing this question What is the best way to manage duplicate code in static HTML websites ...
I'm starting to create PHP variables for each chunk of duplicated HTML code. My website is divided into themes and each theme has its duplicated code. I have the option to:
- save all variables into a single PHP file, and then include it at the beginning of each HTML page (even if the page only uses one or two of those variables);
- create a PHP file for each "theme" and include at least two PHP files at each HTML (one with the common variables and other with the specific variables.
Which one is faster? Including several small PHP files increase the page's loading time? I think the "non-monolithic" version is easier to maintain... I just need to know if I'm sacrificing performance.