For example I tried so:
parse_ini_string('
abc[] =
');
but the element abc is not empty, there is 1 empty string in it
For example I tried so:
parse_ini_string('
abc[] =
');
but the element abc is not empty, there is 1 empty string in it
You can't store empty arrays in an INI file directly. The INI format is not expressive enough - the syntax above describes an array push, and as such it pushes an empty element onto the array.
A workaround, albeit ugly, is something like this:
$parsed = parse_ini_file('file.ini');
foreach ($parsed as $k => &$v) {
if ($v === array('')) {
$v = array();
}
}