chinacn/ini-parser

PHP INI Parser Library

0.1.1 2017-08-25 06:52 UTC

This package is not auto-updated.

Last update: 2024-04-14 01:51:57 UTC


README

PHP INI Parser

1.Installation via Composer

Add "chinacn/ini-parser": "~0.1" to the require block in your composer.json and then run composer install.

{
       "require": {
               "chinacn/ini-parser": "~0.1"
       }
}

Alternatively, you can simply run the following from the command line:

composer require chinacn/ini-parser "~0.1";

2.Usage

you can use code like:

include "./vendor/autoload.php";

$str=  <<<'EOT'

[numa]

interleave          = all       # Interleave

#cpunodebind         = 1         # Bind to node 1

#membind             = 1



[mysqld]

# Network

port                = 3306

socket              = /data1/mysql/tmp/mysql.sock



large-pages                      # Enable large pages

EOT;

$parser = new chinacn\parser\IniParser();

$parser->parse($str);