PHP code example of susina / param-resolver

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

    

susina / param-resolver example snippets


 declare(strict_types=1);

    use Susina\ParamResolver\ParamResolver;

    //load and convert into an array
    $array = json_decode('configuration.json');

    //resolve the parameters
    $resolved = ParamResolver::create()->resolve($array);

    //print the resolved array or else
    echo json_encode($resolved);



$_ENV['host']   = '192.168.0.54'; //Database host name
$_ENV['dbName'] = 'myDB'; //Database name