You would use this the same way you use configuration-files now - it’s not really different from what you’re doing with “config/main.php” right now, except of course the syntax is different, and plus all the benefits listed above. I think I’ve listed plenty of reasons “why”? 
As for “how”, there are still some unfinished parts here - but let’s assume that this had been integrated with the application-object in Yii, and here’s a partial example to give you a general idea.
First, the configuration-class for your application:
<?php # "component/MyAppConf.php"
/**
* @property string $rootPath the root-path (e.g. "protected" folder)
* @property CDbConnection $connection primary database-connection
* @property CCache $cache common cache for db-connection and others
*/
class MyAppConf extends Configuration
{}
Next, the “index.php” main dispatch script - I’m skipping some parts here, and probably getting some property-names wrong etc., but just to give you a general idea:
<?php # "index.php"
// (bootstrap Yii here...)
Yii::app()->config->load('main.php');
if ($_SERVER['HTTP_HOST'] == 'localhost') {
// load additional configuration for test/development environment:
Yii::app()->config->load('test.php');
}
Yii::app()->run();
Now your application-wide configuration file - this one is always loaded first, so this should contain a complete configuration with defaults for everything:
<?php # "config/main.php"
$this->rootPath = dirname(dirname(__FILE__));
$this->connection = function(CCache $cache) {
// note that $cache will automatically initialize when CDbConnection is initialized.
$db = new CDbConnection();
$db->host = 'db.foo.com';
$db->username = 'foo';
$db->password = 'bar';
$db->cache = $cache;
return $db;
};
$this->cache = function($rootPath) {
$c = new CFileCache();
$c->path = $rootPath.'/runtime/cache';
return $c;
};
And now my local configuration-overrides for testing - as you saw in "index.php", this only loads when the hostname is "localhost", so I can put my local configuration-overrides here:
<?php # "config/test.php"
$this->configure(function(CDbConnection $connection) {
$connection->host = 'localhost';
$connection->username = 'root';
$connection->password = '';
});
That’s it, a very basic example, probably with some errors here and there, I just typed this up quick to give you some idea of how you would use this…