gaucho / env
Registers environment variables from a .env file (only 40 lines of code!)
v0.2.0
2023-01-29 20:29 UTC
README
Registers environment variables from a .env file (only 40 lines of code!)
Installation
composer require gaucho/env
.env format (RAW)
#COMMENT
VAR=foo
Use
<?php require 'vendor/autoload.php'; use gaucho\Env; $env_filename=__DIR__.'/.env'; new Env($env_filename); print $_ENV['VAR'];//output: foo