3v4l.org

run code in 200+ php & hhvm versions
<?php $ini = <<<END [section] 1="Hello" 2="Hello" ; comment END; var_dump(parse_ini_string($ini,true,INI_SCANNER_RAW)); var_dump(parse_ini_string($ini,true,INI_SCANNER_NORMAL)); var_dump(parse_ini_string($ini,true,INI_SCANNER_TYPED));
based on 9fPQA
Output for 7.1.25, 7.2.12 - 7.3.1
array(1) { ["section"]=> array(2) { [1]=> string(5) "Hello" [2]=> string(5) "Hello" } } array(1) { ["section"]=> array(2) { [1]=> string(5) "Hello" [2]=> string(5) "Hello" } } array(1) { ["section"]=> array(2) { [1]=> string(5) "Hello" [2]=> string(5) "Hello" } }
Output for 5.6.38 - 7.1.22, 7.2.0 - 7.2.11
array(1) { ["section"]=> array(2) { [1]=> string(5) "Hello" [2]=> string(8) ""Hello" " } } array(1) { ["section"]=> array(2) { [1]=> string(5) "Hello" [2]=> string(5) "Hello" } } array(1) { ["section"]=> array(2) { [1]=> string(5) "Hello" [2]=> string(5) "Hello" } }