PHP code example of jdwx / config

1. Go to this page and download the library: Download jdwx/config library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jdwx / config example snippets




declare( strict_types = 1 );

use JDWX\Config\ConfigDB;
use JDWX\Config\IniParser;

$stDefaults );
$cfg = ConfigDB::fromFile( __DIR__ . '/example.ini', $defaults );
echo "[foo]bar = ", $cfg->get( 'foo', 'bar' )->asString(), "\n";
echo "[foo]qux = ", $cfg->get( 'foo', 'qux' )->asInt(), "\n";
echo "[foo]grault = ", $cfg->get( 'foo', 'grault' )->asString(), "\n";