parse_ini_string
(PHP 5 >= 5.3.0)
parse_ini_string — Parse a configuration string
Descrição
$ini
[, bool $process_sections = false
[, int $scanner_mode = INI_SCANNER_NORMAL
]] )
parse_ini_string() returns the settings in string
ini in an associative array.
The structure of the ini string is the same as the php.ini's.
Parâmetros
-
ini -
The contents of the ini file being parsed.
-
process_sections -
By setting the
process_sectionsparameter toTRUE, you get a multidimensional array, with the section names and settings included. The default forprocess_sectionsisFALSE -
scanner_mode -
Can either be
INI_SCANNER_NORMAL(default) orINI_SCANNER_RAW. IfINI_SCANNER_RAWis supplied, then option values will not be parsed.
Valor Retornado
The settings are returned as an associative array on success,
and FALSE on failure.
Notas
Note: There are reserved words which must not be used as keys for ini files. These include: null, yes, no, true, false, on, off, none. Values null, off, no and false result in "". Values on, yes and true result in "1". Characters ?{}|&~![()^" must not be used anywhere in the key and have a special meaning in the value.