Via Composer
$ composer require alireaza/dot-env-resolver-commands
use AliReaza\DotEnv\DotEnv;
use AliReaza\DotEnv\Resolver\Commands;
$env = new DotEnv('.env', [
new Commands(),
]);
$env->toArray(); // Array of variables defined in .env
The MIT License (MIT). Please see License File for more information.