I am building a site that has 30-40 system settings. These are editable in a text file. I want to make sure that I set the site up with the most logical and less resource-intensive method of pulling these settings.
I have been thinking about using an array:
$system['language'] = 'en';
$system['version'] = '0.1';
And referencing them throughout the site like: echo $system['version'];
Or, I can set them up as an object:
class SiteConfig {
public $language = 'en';
public $version = '0.1';
}
$system = new SiteConfig;
And referencing them throughout the site like: echo $system->version;
Which is best to use, or does anyone have a better suggestion?