I want to start using configuration.php file, like joomla or wp is using too to store some almost static variables like db logins, theme id or selected language. Problem is, that I dont know how to handle with updating this values. Is there possibility how to edit this variables separately, or I have to always replace whole content of the file? Lets say, that I have config.php file with content like:
class DB {
public $theme = 1;
public $db_host = 'abc';
public $db_user = 'adsabc';
public $db_pwd = 'dsads';
public $db_charset = 'utf8';
public $lang = 'gb';
public $debug= 0;
public $gzip = 0;
}
And I want to change variable $lang = 'gb'; to $lang = 'de'; What is most effective way to do this with php?