. , .
For scalar values (Strings, ints, etc.) that are defined once, should never change and should be accessible everywhere, you should use a constant.
If you have some kind of complicated nested configuration, for example:
$config->facebook->apikey = 'secret_key';
$config->facebook->url = 'http://www.facebook.com';
You might want to use an array or api configuration provided by one of the many frameworks ( Zend_Config is nice)
source
share