A php7 extension for parse toml file
https://github.com/toml-lang/toml
array toml_parse_file(string toml_file_name)
array toml_parse_string(string toml_contents)
toml_file_name
: Name of the file read.
toml_contents
: A toml struct string.
The function returns array or False on failure.
An E_ERROR level error is generated if toml contents parse fail, file cannot be found.
An E_NOTICE level error is generated if toml contents is empty.
toml.cache_enable = 1/0
If enable cache, toml_parse_file function will cahce the success result.
If file updated, the file cache will auto reload on the next call.
- a full-line comment : yes
- a comment at the end of a line : yes
- true / false : yes
bool value must be lowercase letter
- bare keys : yes
- quoted keys : yes
- empty keys: yes
key not defind or empty, the key will replace to index num
- normal : yes
- positive or negative : yes
- large : yes
the value will be convert to php long
- normal : yes
- positive or negative : yes
- large : yes
- exponent : yes
the value will be convert to php double
Not support
yes
value will be called php function stripcslashes
yes
extraneous whitespace : yes
yes
yes
yes
multiline : yes
data types fixed : yes (^_^ php is best)
- normal : yes
- qoute key : no (result is not you wanted)
- dots : yes
Not supported
yes