Marcus
Well-known member
I would like to return the exact array or value from /library/config.php
in config.php
returns
When I try to convert it to (array) ...
returns
in config.php
PHP:
$config['test'] = [
'value1' => 'one',
'value2' => 'two',
];
PHP:
$configphp = XenForo_Application::get('config')->test;
print_r($configphp);
PHP:
Zend_Config Object ( [_allowModifications:protected] => [_index:protected] => 0 [_count:protected] => 2 [_data:protected] => Array ( [value1] => one [value2] => two ) [_skipNextIteration:protected] => [_loadedSection:protected] => [_extends:protected] => Array ( ) [_loadFileErrorStr:protected] => ) \n
When I try to convert it to (array) ...
PHP:
$configphp = (array)XenForo_Application::get('config')->test;
print_r($configphp);
PHP:
Array ( [*_allowModifications] => [*_index] => 0 [*_count] => 3 [*_data] => Array ( [value1] => one [value2] => two ) [*_skipNextIteration] => [*_loadedSection] => [*_extends] => Array ( ) [*_loadFileErrorStr] => ) \n