$v) { if(is_integer($k)) isset($res[$k]) ? $res[]=$v : $res[$k]=$v; elseif(is_array($v) && isset($res[$k]) && is_array($res[$k])) $res[$k]= mergeArray($res[$k],$v); else $res[$k]=$v; } } return $res; } //Overwrite the base values with whatever overrides were set $config = mergeArray( $base_config, $local_overrides); // if not already specified in local-main, // specify how many levels of call stack should be shown in each log message defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); //Start the application as usual require_once($yii_path); include('global.php'); Yii::createWebApplication($config)->run();