PHP VERSION: 8.2.18
changed_functions_parse_ini_string.php
<?php
// NOTE: also affects parse_ini_file()
// in PHP 5 returns: 1, 2, 4, 4
// in PHP 7 will trigger an E_COMPILE_ERROR
$ini = <<<TAG
# This is a comment in PHP 5
; This is a comment in PHP 5 or 7
[params]
param.1 = 1
param.2 = 2
param.3 = 3
[other]
other.1 = 1
other.2 = 2
other.3 = 3
TAG;
var_dump(parse_ini_string($ini, TRUE));
Output
array(2) {
["params"]=>
array(3) {
["param.1"]=>
string(1) "1"
["param.2"]=>
string(1) "2"
["param.3"]=>
string(1) "3"
}
["other"]=>
array(3) {
["other.1"]=>
string(1) "1"
["other.2"]=>
string(1) "2"
["other.3"]=>
string(1) "3"
}
}
SOURCE CODE