In this new post to his site Sameer Borate looks at using the TOML configuration file format in a PHP application.
As any one who has programmed knows about configuration files. Configuration files are mostly text files used to configure the parameters and initial settings for computer programs – mostly user applications, operating system settings.[...] In this post we will look into parsing TOML files in PHP. TOML is a configuration file format that is intended to be easy to read due to its obvious semantics and is designed to map unambiguously to a dictionary data structure. “TOML”, the name, is an acronym for “Tom’s Obvious, Minimal Language” referring to its creator Tom Preston-Werner.
He starts with an example of a configuration file in the TOML format and, following the installation/used of the yosymfony/toml library, the result of it being parsed. He also includes an example of using the same library to build out a TOML configuration and dump it to a string for output.