TABS_AND_SPACES [ \t]
WHITESPACE [ \t]+
CONSTANT [a-zA-Z][a-zA-Z0-9_]*
-LABEL [a-zA-Z0-9][a-zA-Z0-9._-]*
+LABEL [a-zA-Z0-9_][a-zA-Z0-9._-]*
TOKENS [:,.\[\]"'()|^&+-/*=%$!~<>?@{}]
OPERATORS [&|~()!]
DOLLAR_CURLY "${"
file_put_contents($filename, $ini);
var_dump(parse_ini_file($filename, true));
+/* #44842, labels starting with underscore */
+$ini = <<<'INI'
+foo=bar1
+_foo=bar2
+foo_=bar3
+INI;
+file_put_contents($filename, $ini);
+var_dump(parse_ini_file($filename, true));
+
@unlink($filename);
echo "Done\n";
?>
unicode(5) "value"
}
}
+array(3) {
+ [u"foo"]=>
+ unicode(4) "bar1"
+ [u"_foo"]=>
+ unicode(4) "bar2"
+ [u"foo_"]=>
+ unicode(4) "bar3"
+}
Done