PHP code example of progphil1337 / php-config

1. Go to this page and download the library: Download progphil1337/php-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/ */

    

progphil1337 / php-config example snippets


use Progphil1337\Config\Config;

$config = Config::create(__DIR__ . DIRECTORY_SEPARATOR . 'config.yaml');

$config->map(function (mixed $value): mixed {
	if (str_starts_with($value, '%m')) {
		return 'Modified value';
	}

	return $value;
});

$config->setHierarchyOperator('::'); // :: is default

echo $config->get('HttpServer::ip');

bash
$ composer