$config = new Config('config.ini'); $config->setValue('db.host', 'localhost');
$config = new Config('config.json', 'json'); $config->setValue('db.port', 3306);In this example, we create a new Config object representing a configuration file named 'config.json'. We also specify that the configuration file is in the JSON format. We then set the value of the 'db.port' key to 3306. This example assumes that we are using a library/package that supports configuration files in the JSON format.