PHP code example of dbtlr / php-env-builder

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

    

dbtlr / php-env-builder example snippets




$config = [
    'verbose' => true,
    'loadEnv' => true,
];

$builder = new \Dbtlr\PHPEnvBuilder\Builder('/path/to/.env', $config);

$builder->ask(
    'name',              // ENV variable name
    'What is your name?' // Command prompt
    '',                  // Default answer
    true                 // Is