PHP code example of imponeer / env

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

    

imponeer / env example snippets


// Get an environment variable with a default value
$path = env('APP_PATH', '/var/www');

// Get a boolean environment variable
$isDebug = (bool) env('APP_DEBUG', false);

// Get an integer value
$port = (int) env('APP_PORT', 8080);