kphp icon indicating copy to clipboard operation
kphp copied to clipboard

Added parse_ini_string, parse_ini_file functions

Open pmswga opened this issue 2 years ago • 1 comments

At the moment, the functions do not process an array of values.

Example:

[Section3.1] var1[]=val_1_1 var1[]=val_1_2 var1[]=val_1_3

This section will skip.

pmswga avatar Nov 28 '22 12:11 pmswga

general, I'm not sure it's correct way of parsing ini string. For example, PHP use autogenerated parser for that. Can you explain your parsing method somehow?

I didn't use the automatically generated parsers, because:

  1. I didn't think about it
  2. I'm not sure that I could correctly implement it in runtime

Therefore, the solution that came to my mind is to check the resulting strings by regular expressions.

pmswga avatar Nov 29 '22 17:11 pmswga