$delimiter
$delimiter : string
Nested section delimiter
Extended parse_ini_string() supporting nested sections.
print_r(\donbidon\Lib\Config\Ini::parse(
file_get_contents("/path/to/config.php"),
TRUE)
);
applied to the following ini-file
; <?php die; __halt_compiler();
[section]
subsection.arg.foo = "source foo"
subsection.array[] = "value 0"
subsection.array[] = "value 1"
[section.subsection]
arg.foo = "overridden foo"
array.newKey = "new key"
outputs
Array
(
[section] => Array
(
[subsection] => Array
(
[arg] => Array
(
[foo] => overridden foo
)
[array] => Array
(
[0] => value 0
[1] => value 1
[newKey] => new key
)
)
)
)
parse(string $string, boolean $sections = false, integer $mode = INI_SCANNER_NORMAL) : array|false
Parses a configuration string.
Cuts PHP-docblock containing file summary and ending with "__halt_compiler();".
string | $string | |
boolean | $sections | Process sections |
integer | $mode | Scanner mode |