PHP code example of zenlix / zenenv

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

    

zenlix / zenenv example snippets


use ZenEnv\ZenEnv;

$env = new ZenEnv('/home/rustem/web/public_html/.env');

$env->get();

print_r($env-get());

['PARAM1'=>'VALUE1','PARAM2'=>'VALUE2']

$env->delete(['KEY1', 'KEY2']);

$env->add([
'KEY'=>'VAL',
'KEY2'=>'VAL2'
]);

$env->set([
'PARAM1'=>'VALUE',
'PARAM2'=>'VALUE'
]);