$object = (object)json_decode(json_encode($data));
$array = json_decode(json_encode($data), TRUE);
$data= array(
'base_url' => 'http://example.com/',
'uri_protocol' => 'AUTO',
'url_suffix' => '',
'language' => 'english',
'modules_locations' => array(
'core_module' => 'packages/core_modules/',
'module' => 'packages/modules/'
)
);
$convert = json_encode($data);
$object = (object)json_decode($convert);
$array = json_decode($convert, TRUE);
echo "<pre>";
print_r($object);
print_r($array);
echo "</pre>";